|
4 | 4 | ->in(__DIR__ . '/src') |
5 | 5 | ->in(__DIR__ . '/tests'); |
6 | 6 |
|
7 | | -return \PhpCsFixer\Config::create() |
| 7 | +return (new PhpCsFixer\Config()) |
8 | 8 | ->setRiskyAllowed(true) |
9 | 9 | ->setRules([ |
10 | | - '@PSR2' => true, |
| 10 | + '@PSR12' => true, |
11 | 11 |
|
12 | | - 'align_multiline_comment' => true, |
13 | | - 'array_indentation' => true, |
14 | | - 'array_syntax' => ['syntax' => 'short'], |
15 | | - 'backtick_to_shell_exec' => true, |
| 12 | + 'array_syntax' => [ |
| 13 | + 'syntax' => 'short' |
| 14 | + ], |
16 | 15 | 'binary_operator_spaces' => true, |
17 | 16 | 'blank_line_after_opening_tag' => true, |
18 | 17 | 'cast_spaces' => true, |
19 | | - 'class_attributes_separation' => ['elements' => ['method']], |
20 | | - 'combine_consecutive_issets' => true, |
| 18 | + 'class_attributes_separation' => ['elements' => ['method' => 'one']], |
21 | 19 | 'combine_consecutive_unsets' => true, |
22 | | - 'concat_space' => ['spacing' => 'one'], |
| 20 | + 'concat_space' => [ |
| 21 | + 'spacing' => 'one' |
| 22 | + ], |
23 | 23 | 'declare_equal_normalize' => true, |
24 | 24 | 'dir_constant' => true, |
25 | 25 | 'ereg_to_preg' => true, |
26 | | - 'fully_qualified_strict_types' => true, |
27 | 26 | 'function_to_constant' => true, |
28 | 27 | 'function_typehint_space' => true, |
29 | 28 | 'heredoc_to_nowdoc' => true, |
30 | 29 | 'include' => true, |
31 | 30 | 'is_null' => true, |
32 | | - 'list_syntax' => ['syntax' => 'short'], |
33 | | - 'logical_operators' => true, |
34 | 31 | 'lowercase_cast' => true, |
35 | | - 'lowercase_static_reference' => true, |
36 | 32 | 'magic_constant_casing' => true, |
37 | | - 'modernize_types_casting' => true, |
38 | | - 'multiline_comment_opening_closing' => true, |
39 | 33 | 'multiline_whitespace_before_semicolons' => true, |
40 | | - 'native_constant_invocation' => true, |
| 34 | + 'modernize_types_casting' => true, |
41 | 35 | 'native_function_casing' => true, |
42 | | - 'native_function_invocation' => ['include' => ['@compiler_optimized']], |
43 | 36 | 'new_with_braces' => true, |
44 | 37 | 'no_alias_functions' => true, |
45 | | - 'no_binary_string' => true, |
46 | 38 | 'no_blank_lines_after_class_opening' => true, |
47 | 39 | 'no_blank_lines_after_phpdoc' => true, |
48 | 40 | 'no_empty_comment' => true, |
49 | 41 | 'no_empty_phpdoc' => true, |
50 | 42 | 'no_empty_statement' => true, |
51 | 43 | 'no_extra_blank_lines' => true, |
52 | | - 'no_homoglyph_names' => true, |
53 | 44 | 'no_leading_import_slash' => true, |
54 | 45 | 'no_leading_namespace_whitespace' => true, |
55 | 46 | 'no_mixed_echo_print' => true, |
|
58 | 49 | 'no_short_bool_cast' => true, |
59 | 50 | 'no_singleline_whitespace_before_semicolons' => true, |
60 | 51 | 'no_spaces_around_offset' => true, |
61 | | - 'no_trailing_comma_in_list_call' => true, |
62 | | - 'no_trailing_comma_in_singleline_array' => true, |
| 52 | + 'no_trailing_comma_in_singleline' => true, |
63 | 53 | 'no_unneeded_control_parentheses' => true, |
64 | | - 'no_unneeded_curly_braces' => true, |
65 | | - 'no_unneeded_final_method' => true, |
66 | | - 'no_unreachable_default_argument_value' => true, |
67 | 54 | 'no_unused_imports' => true, |
68 | 55 | 'no_useless_return' => true, |
69 | 56 | 'no_whitespace_before_comma_in_array' => true, |
70 | 57 | 'no_whitespace_in_blank_line' => true, |
71 | 58 | 'non_printable_character' => true, |
72 | 59 | 'normalize_index_brace' => true, |
73 | 60 | 'object_operator_without_whitespace' => true, |
74 | | - 'ordered_class_elements' => ['order' => ['use_trait', 'constant', 'property', 'construct', 'method']], |
| 61 | + 'ordered_class_elements' => [ |
| 62 | + 'order' => ['use_trait', 'constant', 'property', 'construct', 'method'], |
| 63 | + ], |
75 | 64 | 'ordered_imports' => true, |
76 | 65 | 'php_unit_construct' => true, |
77 | | - 'php_unit_dedicate_assert' => ['target' => 'newest'], |
78 | | - 'php_unit_expectation' => true, |
79 | | - 'php_unit_mock' => true, |
80 | | - 'php_unit_namespaced' => true, |
81 | | - 'php_unit_no_expectation_annotation' => true, |
82 | | - 'php_unit_set_up_tear_down_visibility' => true, |
| 66 | + 'php_unit_dedicate_assert' => true, |
83 | 67 | 'php_unit_strict' => true, |
84 | | - 'php_unit_test_case_static_method_calls' => ['call_type' => 'this'], |
85 | 68 | 'phpdoc_add_missing_param_annotation' => true, |
86 | | - 'phpdoc_align' => ['align' => 'left'], |
87 | 69 | 'phpdoc_annotation_without_dot' => true, |
88 | 70 | 'phpdoc_indent' => true, |
89 | | - 'phpdoc_inline_tag' => true, |
| 71 | + 'phpdoc_inline_tag_normalizer' => true, |
90 | 72 | 'phpdoc_no_access' => true, |
91 | 73 | 'phpdoc_no_alias_tag' => true, |
92 | 74 | 'phpdoc_no_package' => true, |
93 | | - 'phpdoc_no_useless_inheritdoc' => true, |
94 | | - 'phpdoc_return_self_reference' => true, |
95 | 75 | 'phpdoc_scalar' => true, |
96 | 76 | 'phpdoc_single_line_var_spacing' => true, |
97 | 77 | 'phpdoc_summary' => true, |
98 | | - 'phpdoc_to_comment' => true, |
99 | 78 | 'phpdoc_trim' => true, |
100 | | - 'phpdoc_trim_consecutive_blank_line_separation' => true, |
101 | 79 | 'phpdoc_types' => true, |
102 | 80 | 'phpdoc_var_without_name' => true, |
103 | 81 | 'pow_to_exponentiation' => true, |
104 | | - 'psr4' => true, |
| 82 | + 'psr_autoloading' => true, |
105 | 83 | 'return_type_declaration' => true, |
106 | 84 | 'self_accessor' => true, |
107 | | - 'semicolon_after_instruction' => true, |
108 | | - 'set_type_to_cast' => true, |
109 | 85 | 'short_scalar_cast' => true, |
110 | | - 'simplified_null_return' => true, |
111 | 86 | 'single_blank_line_before_namespace' => true, |
112 | 87 | 'single_line_comment_style' => true, |
113 | 88 | 'single_quote' => true, |
114 | 89 | 'space_after_semicolon' => true, |
115 | | - 'standardize_increment' => true, |
116 | 90 | 'standardize_not_equals' => true, |
117 | 91 | 'strict_comparison' => true, |
118 | 92 | 'strict_param' => true, |
119 | 93 | 'ternary_operator_spaces' => true, |
120 | | - 'ternary_to_null_coalescing' => true, |
121 | | - 'trailing_comma_in_multiline_array' => true, |
| 94 | + 'trailing_comma_in_multiline' => true, |
122 | 95 | 'trim_array_spaces' => true, |
| 96 | + 'visibility_required' => ['elements' => ['property', 'method']], |
123 | 97 | 'whitespace_after_comma_in_array' => true, |
124 | 98 | ]) |
125 | 99 | ->setFinder($finder); |
0 commit comments