|
1 | 1 | <?php |
2 | 2 |
|
| 3 | +use PhpCsFixer\Runner\Parallel\ParallelConfigFactory; |
| 4 | + |
3 | 5 | $finder = PhpCsFixer\Finder::create() |
4 | 6 | ->in(__DIR__.'/src') |
5 | 7 | ; |
6 | 8 |
|
7 | 9 | $config = new PhpCsFixer\Config(); |
8 | 10 |
|
9 | 11 | return $config |
| 12 | + ->setParallelConfig(ParallelConfigFactory::detect()) |
10 | 13 | ->setRules([ |
11 | | - '@PSR2' => true, |
| 14 | + '@PSR12' => true, |
12 | 15 | 'array_syntax' => ['syntax' => 'short'], |
13 | 16 | 'concat_space' => ['spacing' => 'none'], |
14 | 17 | 'global_namespace_import' => [ |
15 | 18 | 'import_classes' => true, |
16 | 19 | 'import_constants' => true, |
17 | 20 | 'import_functions' => true, |
18 | 21 | ], |
19 | | - 'list_syntax' => ['syntax' => 'short'], |
20 | 22 | 'new_with_parentheses' => true, |
21 | 23 | 'no_blank_lines_after_phpdoc' => true, |
22 | 24 | 'no_empty_phpdoc' => true, |
23 | 25 | 'no_empty_comment' => true, |
24 | 26 | 'no_leading_import_slash' => true, |
25 | | - 'no_superfluous_phpdoc_tags' => [ |
26 | | - 'allow_mixed' => true, |
27 | | - 'remove_inheritdoc' => true, |
28 | | - 'allow_unused_params' => false, |
29 | | - ], |
| 27 | + 'no_superfluous_phpdoc_tags' => true, |
30 | 28 | 'no_trailing_comma_in_singleline' => true, |
31 | 29 | 'no_unused_imports' => true, |
32 | 30 | 'nullable_type_declaration_for_default_null_value' => true, |
33 | 31 | 'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'], |
34 | 32 | 'phpdoc_add_missing_param_annotation' => ['only_untyped' => true], |
35 | | - 'phpdoc_align' => true, |
| 33 | + 'phpdoc_align' => ['align' => 'left'], |
36 | 34 | 'phpdoc_no_empty_return' => true, |
37 | 35 | 'phpdoc_order' => true, |
38 | 36 | 'phpdoc_scalar' => true, |
|
47 | 45 | 'trailing_comma_in_multiline' => true, |
48 | 46 | 'trim_array_spaces' => true, |
49 | 47 | 'whitespace_after_comma_in_array' => true, |
| 48 | + 'yoda_style' => true, |
50 | 49 | ]) |
51 | 50 | ->setFinder($finder); |
0 commit comments