11<?php
22
3- $ finder = PhpCsFixer \Finder::create ()
3+ use PhpCsFixer \Config ;
4+ use PhpCsFixer \Finder ;
5+ use PhpCsFixer \Runner \Parallel \ParallelConfigFactory ;
6+
7+ $ finder = Finder::create ()
48 ->exclude ('vendor ' )
59 ->in (__DIR__ )
610;
711
8- $ config = new PhpCsFixer \Config ();
9- return $ config ->setRules ([
10- '@PSR12 ' => true ,
11- '@PSR12:risky ' => true ,
12- '@PhpCsFixer ' => true ,
13- '@PhpCsFixer:risky ' => true ,
14- '@PHP71Migration ' => true ,
15- '@PHP71Migration:risky ' => true ,
16- 'array_syntax ' => ['syntax ' => 'short ' ],
17- 'php_unit_test_class_requires_covers ' => false ,
18- 'backtick_to_shell_exec ' => true ,
19- 'blank_line_before_statement ' => [
20- 'statements ' => ['declare ' , 'return ' , 'case ' ],
21- ],
22- 'comment_to_phpdoc ' => false ,
23- 'declare_equal_normalize ' => ['space ' => 'single ' ],
24- 'global_namespace_import ' => true ,
25- 'linebreak_after_opening_tag ' => true ,
26- 'native_function_invocation ' => false ,
27- 'no_unset_on_property ' => false ,
28- 'php_unit_test_case_static_method_calls ' => ['call_type ' => 'self ' ],
29- 'phpdoc_to_comment ' => false ,
30- 'self_static_accessor ' => true ,
31- ])
32- ->setFinder ($ finder )
33- ;
12+ $ config = new Config ();
13+ return $ config
14+ ->setParallelConfig (ParallelConfigFactory::detect ())
15+ ->setRules ([
16+ '@auto ' => true ,
17+ '@auto:risky ' => true ,
18+ '@PhpCsFixer ' => true ,
19+ '@PhpCsFixer:risky ' => true ,
20+ 'array_syntax ' => ['syntax ' => 'short ' ],
21+ 'php_unit_test_class_requires_covers ' => false ,
22+ 'backtick_to_shell_exec ' => true ,
23+ 'blank_line_before_statement ' => [
24+ 'statements ' => ['declare ' , 'return ' , 'case ' ],
25+ ],
26+ 'comment_to_phpdoc ' => false ,
27+ 'declare_equal_normalize ' => ['space ' => 'single ' ],
28+ 'global_namespace_import ' => true ,
29+ 'linebreak_after_opening_tag ' => true ,
30+ 'native_function_invocation ' => false ,
31+ 'no_unset_on_property ' => false ,
32+ 'php_unit_test_case_static_method_calls ' => ['call_type ' => 'self ' ],
33+ 'phpdoc_to_comment ' => false ,
34+ 'self_static_accessor ' => true ,
35+ ])
36+ ->setFinder ($ finder );
0 commit comments