Skip to content

Commit d00b1e7

Browse files
committed
Update version of cs-fixer
1 parent d91a989 commit d00b1e7

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717
->in(__DIR__.'/tests')
1818
;
1919

20-
return PhpCsFixer\Config::create()
20+
return (new PhpCsFixer\Config())
2121
->setUsingCache(true)
2222
->setRiskyAllowed(true)
23-
->setRules(array(
23+
->setRules([
2424
'@PSR2' => true,
2525
'binary_operator_spaces' => true,
26-
'blank_line_before_return' => true,
26+
'blank_line_before_statement' => ['statements' => ['return']],
2727
'cast_spaces' => true,
28-
'header_comment' => array('header' => $header),
28+
'header_comment' => ['header' => $header],
2929
'include' => true,
30-
'method_separation' => true,
30+
'class_attributes_separation' => ['elements' => ['method' => 'one']],
3131
'no_blank_lines_after_class_opening' => true,
3232
'no_blank_lines_after_phpdoc' => true,
3333
'no_empty_statement' => true,
34-
'no_extra_consecutive_blank_lines' => true,
34+
'no_extra_blank_lines' => true,
3535
'no_leading_import_slash' => true,
3636
'no_leading_namespace_whitespace' => true,
3737
'no_trailing_comma_in_singleline_array' => true,
@@ -44,10 +44,10 @@
4444
'phpdoc_order' => true,
4545
'phpdoc_scalar' => true,
4646
'phpdoc_trim' => true,
47-
'psr0' => true,
47+
'psr_autoloading' => true,
4848
'single_blank_line_before_namespace' => true,
4949
'standardize_not_equals' => true,
5050
'ternary_operator_spaces' => true,
51-
'trailing_comma_in_multiline_array' => true,
52-
))->setFinder($finder);
51+
'trailing_comma_in_multiline' => true,
52+
])->setFinder($finder);
5353

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
"require-dev": {
1919
"phpunit/phpunit": "^6.0 | ^9.5",
2020
"php-parallel-lint/php-parallel-lint": "^1.3",
21-
"friendsofphp/php-cs-fixer": "^2.1",
21+
"friendsofphp/php-cs-fixer": "^3.1",
2222
"phpstan/phpstan": "^0.12"
2323
},
2424
"scripts": {
2525
"test": [
2626
"./vendor/bin/parallel-lint . --exclude vendor",
2727
"./vendor/bin/phpstan analyse --level 5 src tests",
2828
"./vendor/bin/phpunit",
29-
"./vendor/bin/php-cs-fixer fix --using-cache=false --dry-run"
29+
"./vendor/bin/php-cs-fixer fix --using-cache=no --dry-run"
3030
],
31-
"cs": "./vendor/bin/php-cs-fixer fix --using-cache=false"
31+
"cs": "./vendor/bin/php-cs-fixer fix --using-cache=no"
3232
}
3333
}

0 commit comments

Comments
 (0)