|
1 | 1 | <?php |
2 | 2 |
|
3 | | -$finder = (new Symfony\Component\Finder\Finder()) |
4 | | - ->files() |
5 | | - ->name('*.php') |
6 | | - ->in(__DIR__ . '/src') |
7 | | - ->in(__DIR__ . '/spec'); |
| 3 | +$finder = PhpCsFixer\Finder::create() |
| 4 | + ->exclude(['vendor', 'build']) |
| 5 | + ->in(__DIR__); |
8 | 6 |
|
9 | | -return Symfony\CS\Config::create() |
10 | | - ->fixers([ |
11 | | - 'align_double_arrow', |
12 | | - 'align_equals', |
13 | | - 'concat_with_spaces', |
14 | | - 'header_comment', |
15 | | - 'logical_not_operators_with_successor_space', |
16 | | - 'multiline_spaces_before_semicolon', |
17 | | - 'ordered_use', |
18 | | - 'phpdoc_order', |
19 | | - 'strict', |
20 | | - 'strict_param', |
| 7 | +return PhpCsFixer\Config::create() |
| 8 | + ->setRiskyAllowed(true) |
| 9 | + ->setRules([ |
| 10 | + '@Symfony' => true, |
| 11 | + 'binary_operator_spaces' => [ |
| 12 | + 'align_double_arrow' => true, |
| 13 | + 'align_equals' => true, |
| 14 | + ], |
| 15 | + 'concat_space' => ['spacing' => 'one'], |
| 16 | + 'not_operator_with_successor_space' => true, |
| 17 | + 'no_multiline_whitespace_before_semicolons' => true, |
| 18 | + 'no_useless_else' => true, |
| 19 | + 'no_useless_return' => true, |
| 20 | + 'ordered_class_elements' => true, |
| 21 | + 'ordered_imports' => true, |
| 22 | + 'phpdoc_order' => true, |
| 23 | + 'strict_comparison' => true, |
| 24 | + 'strict_param' => true, |
21 | 25 | ]) |
22 | | - ->finder($finder); |
| 26 | + ->setFinder($finder); |
0 commit comments