|
1 | 1 | <?php |
2 | 2 |
|
3 | 3 | $config = (new PhpCsFixer\Config()) |
4 | | - ->setIndent(" ") |
| 4 | + ->setIndent(' ') |
5 | 5 | ->setLineEnding("\n") |
6 | | - ->setCacheFile(__DIR__ . '/.php_cs.cache') |
| 6 | + ->setCacheFile(__DIR__ . '/.php-cs-fixer.cache') |
7 | 7 | ->setRiskyAllowed(true) |
8 | 8 | ->setRules([ |
9 | 9 | '@PHP71Migration' => true, |
10 | | - '@PHP73Migration' => false, |
| 10 | + '@PHP71Migration:risky' => true, |
| 11 | + '@PHP73Migration' => true, |
| 12 | + '@PHP74Migration' => true, |
| 13 | + '@PHP74Migration:risky' => true, |
| 14 | + '@PHP80Migration' => false, |
| 15 | + '@PHP80Migration:risky' => true, |
| 16 | + '@PHP81Migration' => false, |
11 | 17 | '@PhpCsFixer' => true, |
12 | 18 | '@PhpCsFixer:risky' => true, |
13 | | - '@PSR2' => true, |
| 19 | + '@PSR12' => true, |
14 | 20 | '@Symfony' => true, |
15 | 21 | '@Symfony:risky' => true, |
16 | 22 | 'align_multiline_comment' => true, |
|
22 | 28 | 'comment_to_phpdoc' => true, |
23 | 29 | 'compact_nullable_typehint' => true, |
24 | 30 | 'concat_space' => ['spacing' => 'one'], |
| 31 | + 'echo_tag_syntax' => ['format' => 'short'], |
25 | 32 | 'escape_implicit_backslashes' => false, |
26 | 33 | 'fully_qualified_strict_types' => true, |
27 | 34 | 'linebreak_after_opening_tag' => true, |
28 | 35 | 'list_syntax' => ['syntax' => 'short'], |
29 | | - 'method_argument_space' => ['ensure_fully_multiline' => true], |
30 | | - 'native_constant_invocation' => true, |
31 | | - 'native_function_invocation' => true, |
| 36 | + 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], |
| 37 | + 'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'], |
| 38 | + 'native_constant_invocation' => ['scope' => 'all'], |
| 39 | + 'native_function_invocation' => ['scope' => 'all', 'include' => ['@compiler_optimized']], |
32 | 40 | 'native_function_type_declaration_casing' => true, |
33 | 41 | 'no_alternative_syntax' => true, |
34 | | - 'no_multiline_whitespace_before_semicolons' => true, |
35 | 42 | 'no_null_property_initialization' => true, |
36 | | - 'no_short_echo_tag' => true, |
37 | 43 | 'no_superfluous_elseif' => true, |
38 | 44 | 'no_unneeded_control_parentheses' => true, |
| 45 | + 'no_useless_concat_operator' => false, |
39 | 46 | 'no_useless_else' => true, |
40 | 47 | 'no_useless_return' => true, |
41 | 48 | 'not_operator_with_space' => false, |
42 | 49 | 'not_operator_with_successor_space' => false, |
43 | 50 | 'ordered_class_elements' => true, |
44 | 51 | 'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['class', 'const', 'function']], |
45 | 52 | 'ordered_interfaces' => true, |
46 | | - 'php_unit_ordered_covers' => true, |
47 | 53 | 'php_unit_set_up_tear_down_visibility' => true, |
48 | 54 | 'php_unit_strict' => true, |
49 | 55 | 'php_unit_test_class_requires_covers' => true, |
50 | 56 | 'phpdoc_add_missing_param_annotation' => true, |
51 | 57 | 'phpdoc_order' => true, |
| 58 | + 'phpdoc_order_by_value' => ['annotations' => ['covers']], |
52 | 59 | 'phpdoc_to_comment' => false, |
53 | 60 | 'phpdoc_types_order' => true, |
54 | 61 | 'pow_to_exponentiation' => true, |
|
57 | 64 | 'simple_to_complex_string_variable' => true, |
58 | 65 | 'single_line_comment_style' => true, |
59 | 66 | 'single_trait_insert_per_statement' => true, |
| 67 | + 'static_lambda' => false, |
60 | 68 | 'strict_comparison' => false, |
61 | 69 | 'strict_param' => false, |
62 | 70 | 'string_line_ending' => true, |
| 71 | + 'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arrays', 'arguments']], |
| 72 | + 'types_spaces' => ['space_multiple_catch' => 'single'], |
63 | 73 | 'yoda_style' => false, |
64 | 74 | ]) |
65 | 75 | ->setFinder( |
|
0 commit comments