@@ -9,74 +9,48 @@ For the full copyright and license information, please view the LICENSE
99file that was distributed with this source code.
1010HEADER;
1111
12- // Use PHP-CS-Fixer 2+ if it is available
13- if (\class_exists (PhpCsFixer \Config::class, false )) {
14- return PhpCsFixer \Config::create ()
15- ->setUsingCache (true )
16- ->setRiskyAllowed (true )
17- ->setRules ([
18- '@PHP56Migration ' => true ,
19- '@PHP56Migration:risky ' => true ,
20- '@PHPUnit57Migration:risky ' => true ,
21- '@Symfony ' => true ,
22- '@Symfony:risky ' => true ,
23- 'array_syntax ' => ['syntax ' => 'short ' ],
24- 'blank_line_after_opening_tag ' => true ,
25- 'combine_consecutive_issets ' => true ,
26- 'combine_consecutive_unsets ' => true ,
27- 'explicit_string_variable ' => true ,
28- 'global_namespace_import ' => ['import_classes ' => false ],
29- 'header_comment ' => [
30- 'header ' => $ header ,
31- ],
32- 'logical_operators ' => true ,
33- 'method_argument_space ' => ['on_multiline ' => 'ensure_fully_multiline ' ],
34- 'multiline_whitespace_before_semicolons ' => true ,
35- 'no_alternative_syntax ' => true ,
36- 'no_extra_blank_lines ' => true ,
37- 'no_null_property_initialization ' => true ,
38- 'no_php4_constructor ' => true ,
39- 'no_short_echo_tag ' => true ,
40- 'no_superfluous_elseif ' => true ,
41- 'no_superfluous_phpdoc_tags ' => ['allow_mixed ' => true ],
42- 'no_unset_on_property ' => true ,
43- 'no_useless_else ' => true ,
44- 'no_useless_return ' => true ,
45- 'ordered_class_elements ' => true ,
46- 'ordered_imports ' => true ,
47- 'php_unit_construct ' => true ,
48- 'php_unit_set_up_tear_down_visibility ' => true ,
49- 'php_unit_strict ' => true ,
50- 'phpdoc_order ' => true ,
51- 'single_line_throw ' => false ,
52- 'static_lambda ' => true ,
53- 'strict_param ' => true ,
54- ])
55- ->setFinder (
56- PhpCsFixer \Finder::create ()->exclude (['Tests/Functional/cache ' ])->in (__DIR__ )
57- )
58- ;
59- }
60-
61- return Symfony \CS \Config \Config::create ()
12+ return PhpCsFixer \Config::create ()
6213 ->setUsingCache (true )
63- ->fixers ([
64- 'combine_consecutive_unsets ' ,
65- 'ereg_to_preg ' ,
66- 'header_comment ' => $ header ,
67- 'newline_after_open_tag ' ,
68- 'ordered_use ' ,
69- 'php_unit_construct ' ,
70- 'php_unit_dedicate_assert ' ,
71- 'php_unit_strict ' ,
72- 'phpdoc_order ' ,
73- 'short_array_syntax ' ,
74- 'short_echo_tag ' ,
75- 'strict_param ' ,
14+ ->setRiskyAllowed (true )
15+ ->setRules ([
16+ '@PHP56Migration ' => true ,
17+ '@PHP56Migration:risky ' => true ,
18+ '@PHPUnit57Migration:risky ' => true ,
19+ '@Symfony ' => true ,
20+ '@Symfony:risky ' => true ,
21+ 'array_syntax ' => ['syntax ' => 'short ' ],
22+ 'blank_line_after_opening_tag ' => true ,
23+ 'combine_consecutive_issets ' => true ,
24+ 'combine_consecutive_unsets ' => true ,
25+ 'explicit_string_variable ' => true ,
26+ 'global_namespace_import ' => ['import_classes ' => false ],
27+ 'header_comment ' => [
28+ 'header ' => $ header ,
29+ ],
30+ 'logical_operators ' => true ,
31+ 'method_argument_space ' => ['on_multiline ' => 'ensure_fully_multiline ' ],
32+ 'multiline_whitespace_before_semicolons ' => true ,
33+ 'no_alternative_syntax ' => true ,
34+ 'no_extra_blank_lines ' => true ,
35+ 'no_null_property_initialization ' => true ,
36+ 'no_php4_constructor ' => true ,
37+ 'no_short_echo_tag ' => true ,
38+ 'no_superfluous_elseif ' => true ,
39+ 'no_superfluous_phpdoc_tags ' => ['allow_mixed ' => true ],
40+ 'no_unset_on_property ' => true ,
41+ 'no_useless_else ' => true ,
42+ 'no_useless_return ' => true ,
43+ 'ordered_class_elements ' => true ,
44+ 'ordered_imports ' => true ,
45+ 'php_unit_construct ' => true ,
46+ 'php_unit_set_up_tear_down_visibility ' => true ,
47+ 'php_unit_strict ' => true ,
48+ 'phpdoc_order ' => true ,
49+ 'single_line_throw ' => false ,
50+ 'static_lambda ' => true ,
51+ 'strict_param ' => true ,
7652 ])
77- ->finder (
78- Symfony \CS \Finder \DefaultFinder::create ()
79- ->exclude (['Tests/Functional/cache ' ])
80- ->in (__DIR__ )
53+ ->setFinder (
54+ PhpCsFixer \Finder::create ()->exclude (['Tests/Functional/cache ' ])->in (__DIR__ )
8155 )
8256;
0 commit comments