Skip to content

Commit a1f9e1a

Browse files
committed
[PSR-2 Compliance] The Great @codingStandardsIgnoreFile Massacre
- adjust php-cs-fixer configuration: add is_null and method_separation rules already enforced by phpcs sniffers, update excluded paths
1 parent bbe3ee0 commit a1f9e1a

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

.php_cs.dist

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,16 @@
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 = PhpCsFixer\Finder::create()
12-
->name('*.phtml')
13-
->exclude('dev/tests/functional/generated')
14-
->exclude('dev/tests/functional/var')
15-
->exclude('dev/tests/functional/vendor')
16-
->exclude('dev/tests/integration/tmp')
17-
->exclude('dev/tests/integration/var')
18-
->exclude('lib/internal/Cm')
19-
->exclude('lib/internal/Credis')
20-
->exclude('lib/internal/Less')
21-
->exclude('lib/internal/LinLibertineFont')
22-
->exclude('pub/media')
23-
->exclude('pub/static')
24-
->exclude('setup/vendor')
25-
->exclude('var');
2611

2712
return PhpCsFixer\Config::create()
28-
->setFinder($finder)
13+
->setRiskyAllowed(true)
2914
->setRules([
3015
'@PSR2' => true,
3116
'array_syntax' => ['syntax' => 'short'],
3217
'concat_space' => ['spacing' => 'one'],
3318
'include' => true,
19+
'is_null' => ['use_yoda_style' => false],
20+
'method_separation' => true,
3421
'new_with_braces' => true,
3522
'no_empty_statement' => true,
3623
'no_extra_consecutive_blank_lines' => true,
@@ -46,4 +33,19 @@ return PhpCsFixer\Config::create()
4633
'ordered_imports' => true,
4734
'standardize_not_equals' => true,
4835
'ternary_operator_spaces' => true,
49-
]);
36+
])
37+
->setFinder(
38+
PhpCsFixer\Finder::create()
39+
->name('*.phtml')
40+
->exclude('dev/tests/functional/generated')
41+
->exclude('dev/tests/functional/var')
42+
->exclude('dev/tests/functional/vendor')
43+
->exclude('dev/tests/integration/tmp')
44+
->exclude('dev/tests/integration/var')
45+
->exclude('generated')
46+
->exclude('lib/internal/LinLibertineFont')
47+
->exclude('pub/media')
48+
->exclude('pub/static')
49+
->exclude('setup/vendor')
50+
->exclude('var')
51+
);

0 commit comments

Comments
 (0)