|
1 | 1 | <?php |
2 | 2 |
|
3 | | -$finder = PhpCsFixer\Finder::create() |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +$finder = \PhpCsFixer\Finder::create() |
4 | 6 | ->in(__DIR__) |
5 | 7 | ->exclude([ |
6 | 8 | 'vendor', |
7 | 9 | ]) |
8 | 10 | ; |
9 | 11 |
|
10 | | -$config = new PhpCsFixer\Config(); |
11 | | -return $config->setRules([ |
12 | | - '@PER-CS2.0' => true, |
13 | | - '@PER-CS2.0:risky' => true, |
| 12 | +return (new \PhpCsFixer\Config()) |
| 13 | + ->setRules([ |
| 14 | + '@PER-CS3x0' => true, |
| 15 | + '@PER-CS3x0:risky' => true, |
14 | 16 | '@PHPUnit100Migration:risky' => true, |
15 | | - 'array_syntax' => ['syntax' => 'short'], |
16 | 17 | 'linebreak_after_opening_tag' => true, |
17 | 18 | 'ordered_imports' => true, |
| 19 | + 'no_empty_phpdoc' => true, |
| 20 | + 'no_unused_imports' => true, |
| 21 | + 'no_useless_return' => true, |
| 22 | + 'return_assignment' => true, |
| 23 | + 'simplified_null_return' => true, |
| 24 | + 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true], |
| 25 | + 'phpdoc_add_missing_param_annotation' => true, |
| 26 | + 'phpdoc_indent' => true, |
| 27 | + 'phpdoc_no_access' => true, |
| 28 | + 'phpdoc_no_empty_return' => true, |
| 29 | + 'phpdoc_order_by_value' => true, |
18 | 30 | 'phpdoc_order' => true, |
| 31 | + 'phpdoc_param_order' => true, |
| 32 | + 'phpdoc_separation' => ['skip_unlisted_annotations' => false], |
| 33 | + 'phpdoc_trim_consecutive_blank_line_separation' => true, |
| 34 | + 'phpdoc_trim' => true, |
| 35 | + 'phpdoc_types' => true, |
| 36 | + 'phpdoc_types_no_duplicates' => true, |
| 37 | + 'phpdoc_var_annotation_correct_order' => true, |
| 38 | + 'phpdoc_var_without_name' => true, |
19 | 39 | 'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arguments', 'arrays']], // Remove this rule after dropping support for PHP 7.4 |
20 | 40 | ]) |
21 | 41 | ->setFinder($finder) |
|
0 commit comments