|
4 | 4 |
|
5 | 5 | use PhpCsFixer\Config; |
6 | 6 | use PhpCsFixer\Finder; |
| 7 | +use PhpCsFixer\Runner\Parallel\ParallelConfigFactory; |
7 | 8 |
|
8 | 9 | $finder = Finder::create() |
9 | 10 | ->files() |
|
12 | 13 | ->in(__DIR__ . '/tests'); |
13 | 14 |
|
14 | 15 | return (new Config()) |
| 16 | + ->setParallelConfig(ParallelConfigFactory::detect()) |
15 | 17 | ->setFinder($finder) |
16 | 18 | ->setRiskyAllowed(true) |
17 | 19 | ->setRules([ |
18 | 20 | '@PSR12' => true, |
19 | 21 | 'array_syntax' => ['syntax' => 'short'], |
20 | 22 | 'backtick_to_shell_exec' => true, |
21 | | - 'braces' => [ |
22 | | - 'allow_single_line_closure' => true, |
23 | | - 'allow_single_line_anonymous_class_with_empty_body' => true, |
24 | | - ], |
| 23 | + 'single_space_around_construct' => true, |
| 24 | + 'control_structure_braces' => true, |
| 25 | + 'control_structure_continuation_position' => true, |
| 26 | + 'declare_parentheses' => true, |
| 27 | + 'no_multiple_statements_per_line' => true, |
| 28 | + 'braces_position' => true, |
| 29 | + 'statement_indentation' => true, |
| 30 | + 'no_extra_blank_lines' => true, |
25 | 31 | 'class_definition' => ['single_line' => true], |
26 | 32 | 'concat_space' => ['spacing' => 'one'], |
27 | 33 | 'declare_strict_types' => true, |
|
30 | 36 | 'ereg_to_preg' => true, |
31 | 37 | 'explicit_string_variable' => true, |
32 | 38 | 'fully_qualified_strict_types' => true, |
33 | | - 'function_typehint_space' => true, |
| 39 | + 'type_declaration_spaces' => true, |
34 | 40 | 'general_phpdoc_annotation_remove' => [ |
35 | 41 | 'annotations' => [ |
36 | 42 | 'author', |
|
48 | 54 | 'native_function_invocation' => [ |
49 | 55 | 'include' => ['@compiler_optimized'], |
50 | 56 | ], |
51 | | - 'native_function_type_declaration_casing' => true, |
52 | | - 'new_with_braces' => true, |
| 57 | + 'native_type_declaration_casing' => true, |
| 58 | + 'new_with_parentheses' => true, |
53 | 59 | 'no_blank_lines_after_class_opening' => true, |
54 | 60 | 'no_empty_comment' => true, |
55 | 61 | 'no_empty_phpdoc' => true, |
56 | 62 | 'no_empty_statement' => true, |
57 | | - 'no_extra_blank_lines' => true, |
58 | 63 | 'no_homoglyph_names' => true, |
59 | 64 | 'no_leading_import_slash' => true, |
60 | 65 | 'no_leading_namespace_whitespace' => true, |
|
113 | 118 | 'ternary_to_elvis_operator' => true, |
114 | 119 | 'ternary_to_null_coalescing' => true, |
115 | 120 | 'trailing_comma_in_multiline' => [ |
116 | | - 'elements' => ['arguments', 'arrays', 'match', 'parameters'], |
| 121 | + 'elements' => [ |
| 122 | + 'arrays', |
| 123 | + 'arguments', |
| 124 | + 'parameters', |
| 125 | + ], |
117 | 126 | ], |
118 | 127 | 'trim_array_spaces' => true, |
119 | 128 | 'unary_operator_spaces' => true, |
|
0 commit comments