|
1 | 1 | <?php |
2 | 2 | $finder = new PhpCsFixer\Finder(); |
3 | 3 | $finder |
4 | | - ->exclude('src/Mike42') |
5 | 4 | ->notName('*.twig') |
6 | 5 | ->notName('*.yml') |
7 | | - ->in('src'); |
| 6 | + ->in('src/'); |
8 | 7 |
|
9 | 8 | $config = new PhpCsFixer\Config(); |
10 | 9 | $config |
| 10 | + ->setParallelConfig(new PhpCsFixer\Runner\Parallel\ParallelConfig(4, 20)) |
11 | 11 | ->setRiskyAllowed(true) |
12 | 12 | ->setRules([ |
| 13 | + '@PHP83Migration' => true, |
13 | 14 | '@Symfony' => true, |
14 | 15 | '@Symfony:risky' => true, |
15 | 16 | 'array_syntax' => ['syntax' => 'short'], |
16 | 17 | 'combine_consecutive_unsets' => true, |
17 | | - // one should use PHPUnit methods to set up expected exception instead of annotations |
18 | | - 'general_phpdoc_annotation_remove' => [ |
19 | | - 'expectedException', |
20 | | - 'expectedExceptionMessage', |
21 | | - 'expectedExceptionMessageRegExp' |
22 | | - ], |
23 | | - 'heredoc_to_nowdoc' => true, |
24 | | - 'no_extra_consecutive_blank_lines' => [ |
25 | | - 'break', |
26 | | - 'continue', |
27 | | - 'extra', |
28 | | - 'return', |
29 | | - 'throw', |
30 | | - 'use', |
31 | | - 'parenthesis_brace_block', |
32 | | - 'square_brace_block', |
33 | | - 'curly_brace_block' |
34 | | - ], |
35 | | - 'no_short_echo_tag' => true, |
36 | | - 'no_unreachable_default_argument_value' => true, |
37 | | - 'no_useless_else' => true, |
38 | | - 'no_useless_return' => true, |
39 | | - 'ordered_class_elements' => true, |
40 | | - 'ordered_imports' => true, |
41 | | - 'php_unit_strict' => true, |
42 | | - 'phpdoc_add_missing_param_annotation' => true, |
43 | | - 'phpdoc_order' => true, |
44 | | - 'semicolon_after_instruction' => true, |
45 | | - 'strict_comparison' => true, |
46 | | - 'strict_param' => true, |
47 | | - 'concat_space' => ['spacing' => 'one'], |
48 | | - ]) |
49 | | - ->setFinder($finder) |
| 18 | + // one should use PHPUnit methods to set up expected exception instead of annotations |
| 19 | + 'general_phpdoc_annotation_remove' => [ |
| 20 | + 'annotations' => [ |
| 21 | + 'expectedException', |
| 22 | + 'expectedExceptionMessage', |
| 23 | + 'expectedExceptionMessageRegExp', |
| 24 | + ] |
| 25 | + ], |
| 26 | + 'heredoc_to_nowdoc' => true, |
| 27 | + 'no_extra_blank_lines' => [ |
| 28 | + 'tokens' => [ |
| 29 | + 'break', |
| 30 | + 'continue', |
| 31 | + 'extra', |
| 32 | + 'return', |
| 33 | + 'throw', |
| 34 | + 'use', |
| 35 | + 'parenthesis_brace_block', |
| 36 | + 'square_brace_block', |
| 37 | + 'curly_brace_block' |
| 38 | + ], |
| 39 | + ], |
| 40 | + 'no_unreachable_default_argument_value' => true, |
| 41 | + 'no_useless_else' => true, |
| 42 | + 'no_useless_return' => true, |
| 43 | + 'ordered_class_elements' => true, |
| 44 | + 'ordered_imports' => true, |
| 45 | + 'php_unit_strict' => true, |
| 46 | + 'phpdoc_add_missing_param_annotation' => true, |
| 47 | + 'phpdoc_order' => true, |
| 48 | + 'semicolon_after_instruction' => true, |
| 49 | + 'strict_comparison' => true, |
| 50 | + 'strict_param' => true, |
| 51 | + 'concat_space' => ['spacing' => 'one'], |
| 52 | + ]) |
| 53 | + ->setFinder($finder) |
50 | 54 | ; |
51 | 55 |
|
52 | 56 | return $config; |
0 commit comments