Skip to content

Commit 1ee826a

Browse files
authored
Merge pull request #1 from koopaTro0pa/task-79727
#79727 php-cs-fixer updated
2 parents cf8f302 + b3048cf commit 1ee826a

File tree

4 files changed

+1160
-682
lines changed

4 files changed

+1160
-682
lines changed

.git_hooks/pre-commit/php-cs-fixer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
EXECUTABLE_NAME=php-cs-fixer
44
EXECUTABLE_COMMAND=fix
5-
CONFIG_FILE=.php_cs
5+
CONFIG_FILE=.php-cs-fixer.php
66
CONFIG_FILE_PARAMETER='--config'
77
ROOT=`pwd`
88
ESC_SEQ="\x1b["

.php_cs renamed to .php-cs-fixer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
->ignoreDotFiles(true)
1111
->ignoreVCS(true);
1212

13-
return PhpCsFixer\Config::create()
13+
return (new PhpCsFixer\Config())
1414
->setRules([
1515
'@PSR2' => true,
1616
'array_syntax' => ['syntax' => 'short'],
17-
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
17+
'ordered_imports' => ['sort_algorithm' => 'alpha'],
1818
'no_unused_imports' => true,
19-
'trailing_comma_in_multiline_array' => true,
19+
'trailing_comma_in_multiline' => true,
2020
'phpdoc_scalar' => true,
2121
'unary_operator_spaces' => true,
2222
'blank_line_before_statement' => [
@@ -26,7 +26,7 @@
2626
'phpdoc_var_without_name' => true,
2727
'class_attributes_separation' => [
2828
'elements' => [
29-
'method',
29+
'method' => 'one',
3030
],
3131
],
3232
'method_argument_space' => [

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"illuminate/support": "^8.0"
2020
},
2121
"require-dev": {
22-
"friendsofphp/php-cs-fixer": "^2.16",
22+
"friendsofphp/php-cs-fixer": "^3.2",
2323
"mockery/mockery": "^1.4",
2424
"orchestra/testbench": "^6.0",
2525
"php-parallel-lint/php-var-dump-check": "^0.5.0",
@@ -36,7 +36,7 @@
3636
}
3737
},
3838
"scripts": {
39-
"cs": "php-cs-fixer fix --config .php_cs",
39+
"cs": "php-cs-fixer fix --config .php-cs-fixer.php",
4040
"test": "vendor/bin/phpunit",
4141
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
4242

0 commit comments

Comments
 (0)