8
8
* Pre-commit hook installation:
9
9
* vendor/bin/static-review.php hook:install dev/tools/Magento/Tools/StaticReview/pre-commit .git/hooks/pre-commit
10
10
*/
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 ' );
26
11
27
12
return PhpCsFixer \Config::create ()
28
- ->setFinder ( $ finder )
13
+ ->setRiskyAllowed ( true )
29
14
->setRules ([
30
15
'@PSR2 ' => true ,
31
16
'array_syntax ' => ['syntax ' => 'short ' ],
32
17
'concat_space ' => ['spacing ' => 'one ' ],
33
18
'include ' => true ,
19
+ 'is_null ' => ['use_yoda_style ' => false ],
20
+ 'method_separation ' => true ,
34
21
'new_with_braces ' => true ,
35
22
'no_empty_statement ' => true ,
36
23
'no_extra_consecutive_blank_lines ' => true ,
@@ -46,4 +33,19 @@ return PhpCsFixer\Config::create()
46
33
'ordered_imports ' => true ,
47
34
'standardize_not_equals ' => true ,
48
35
'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