Skip to content

Commit 212f375

Browse files
committed
update config to follow v2 way
1 parent bbc5f4e commit 212f375

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

.php_cs.dist

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Pre-commit hook installation:
99
* vendor/bin/static-review.php hook:install dev/tools/Magento/Tools/StaticReview/pre-commit .git/hooks/pre-commit
1010
*/
11-
$finder = Symfony\CS\Finder\DefaultFinder::create()
11+
$finder = PhpCsFixer\Finder::create()
1212
->name('*.phtml')
1313
->exclude('dev/tests/functional/generated')
1414
->exclude('dev/tests/functional/var')
@@ -24,29 +24,27 @@ $finder = Symfony\CS\Finder\DefaultFinder::create()
2424
->exclude('setup/vendor')
2525
->exclude('var');
2626

27-
return Symfony\CS\Config\Config::create()
28-
->finder($finder)
29-
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
30-
->fixers([
31-
'double_arrow_multiline_whitespaces',
32-
'duplicate_semicolon',
33-
'extra_empty_lines',
34-
'include',
35-
'join_function',
36-
'namespace_no_leading_whitespace',
37-
'new_with_braces',
38-
'object_operator',
39-
'operators_spaces',
40-
'remove_leading_slash_use',
41-
'remove_lines_between_uses',
42-
'single_array_no_trailing_comma',
43-
'spaces_before_semicolon',
44-
'standardize_not_equal',
45-
'ternary_spaces',
46-
'unused_use',
47-
'whitespacy_lines',
48-
'concat_with_spaces',
49-
'multiline_spaces_before_semicolon',
50-
'ordered_use',
51-
'short_array_syntax',
27+
return PhpCsFixer\Config::create()
28+
->setFinder($finder)
29+
->setRules([
30+
'@PSR2' => true,
31+
'array_syntax' => ['syntax' => 'short'],
32+
'concat_space' => ['spacing' => 'one'],
33+
'include' => true,
34+
'new_with_braces' => true,
35+
'no_empty_statement' => true,
36+
'no_extra_consecutive_blank_lines' => ['use'],
37+
'no_extra_consecutive_blank_lines' => true,
38+
'no_leading_import_slash' => true,
39+
'no_leading_namespace_whitespace' => true,
40+
'no_multiline_whitespace_around_double_arrow' => true,
41+
'no_multiline_whitespace_before_semicolons' => true,
42+
'no_singleline_whitespace_before_semicolons' => true,
43+
'no_trailing_comma_in_singleline_array' => true,
44+
'no_unused_imports' => true,
45+
'no_whitespace_in_blank_line' => true,
46+
'object_operator_without_whitespace' => true,
47+
'ordered_imports' => true,
48+
'standardize_not_equals' => true,
49+
'ternary_operator_spaces' => true,
5250
]);

0 commit comments

Comments
 (0)