|
9 | 9 | file that was distributed with this source code. |
10 | 10 | EOF; |
11 | 11 |
|
12 | | -return PhpCsFixer\Config::create() |
| 12 | +$finder = PhpCsFixer\Finder::create() |
| 13 | + ->in([ |
| 14 | + __DIR__ . '/src', |
| 15 | + __DIR__ . '/tests', |
| 16 | + ]) |
| 17 | +; |
| 18 | + |
| 19 | +$config = new PhpCsFixer\Config(); |
| 20 | +$config |
13 | 21 | ->setRiskyAllowed(true) |
14 | 22 | ->setRules([ |
15 | | - '@PHP56Migration' => true, |
16 | 23 | '@Symfony' => true, |
17 | 24 | '@Symfony:risky' => true, |
18 | 25 | 'align_multiline_comment' => true, |
|
26 | 33 | 'header_comment' => ['header' => $header], |
27 | 34 | 'heredoc_to_nowdoc' => true, |
28 | 35 | 'list_syntax' => ['syntax' => 'long'], |
29 | | - 'method_argument_space' => ['ensure_fully_multiline' => true], |
30 | 36 | 'method_chaining_indentation' => false, |
31 | 37 | 'native_function_invocation' => false, |
32 | 38 | 'native_constant_invocation' => false, |
33 | | - 'no_extra_consecutive_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']], |
| 39 | + 'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']], |
34 | 40 | 'no_null_property_initialization' => true, |
35 | | - 'no_short_echo_tag' => true, |
| 41 | + 'echo_tag_syntax' => ['format' => 'long'], |
36 | 42 | 'no_superfluous_phpdoc_tags' => ['allow_mixed' => false], |
37 | 43 | 'no_unneeded_curly_braces' => true, |
38 | 44 | 'no_unneeded_final_method' => true, |
|
61 | 67 | 'method_protected_abstract', |
62 | 68 | 'method_private', |
63 | 69 | ], |
64 | | - 'sortAlgorithm' => 'alpha' |
| 70 | + 'sort_algorithm' => 'alpha' |
65 | 71 | ], |
66 | 72 | 'ordered_imports' => true, |
67 | 73 | 'php_unit_construct' => true, |
|
72 | 78 | 'phpdoc_types_order' => ['null_adjustment' => 'always_last'], |
73 | 79 | 'semicolon_after_instruction' => true, |
74 | 80 | 'single_line_comment_style' => true, |
75 | | - 'visibility_required' => ['const', 'property', 'method'], |
76 | 81 | 'yoda_style' => true, |
77 | 82 | ]) |
78 | | - ->setFinder( |
79 | | - PhpCsFixer\Finder::create() |
80 | | - ->in([ |
81 | | - __DIR__ . '/src', |
82 | | - __DIR__ . '/tests', |
83 | | - ]) |
84 | | - ) |
| 83 | + ->setFinder($finder) |
85 | 84 | ; |
| 85 | + |
| 86 | +return $config; |
0 commit comments