|
25 | 25 | ],
|
26 | 26 | ],
|
27 | 27 | 'cast_spaces' => true,
|
28 |
| - 'class_definition' => true, |
| 28 | + 'class_definition' => false, |
29 | 29 | 'clean_namespace' => true,
|
30 | 30 | 'compact_nullable_typehint' => true,
|
31 | 31 | 'concat_space' => [
|
|
46 | 46 | 'heredoc_to_nowdoc' => true,
|
47 | 47 | 'include' => true,
|
48 | 48 | 'indentation_type' => true,
|
| 49 | + 'integer_literal_case' => true, |
| 50 | + 'braces' => false, |
49 | 51 | 'lowercase_cast' => true,
|
50 |
| - 'lowercase_constants' => true, |
| 52 | + 'constant_case' => [ |
| 53 | + 'case' => 'lower', |
| 54 | + ], |
51 | 55 | 'lowercase_keywords' => true,
|
52 | 56 | 'lowercase_static_reference' => true,
|
53 | 57 | 'magic_constant_casing' => true,
|
54 | 58 | 'magic_method_casing' => true,
|
55 |
| - 'method_argument_space' => true, |
| 59 | + 'method_argument_space' => [ |
| 60 | + 'on_multiline' => 'ignore', |
| 61 | + ], |
56 | 62 | 'class_attributes_separation' => [
|
57 | 63 | 'elements' => [
|
58 |
| - 'method', |
| 64 | + 'method' => 'one', |
59 | 65 | ],
|
60 | 66 | ],
|
61 | 67 | 'visibility_required' => [
|
|
74 | 80 | 'tokens' => [
|
75 | 81 | 'throw',
|
76 | 82 | 'use',
|
77 |
| - 'use_trait', |
78 | 83 | 'extra',
|
79 | 84 | ],
|
80 | 85 | ],
|
|
87 | 92 | 'multiline_whitespace_before_semicolons' => true,
|
88 | 93 | 'no_short_bool_cast' => true,
|
89 | 94 | 'no_singleline_whitespace_before_semicolons' => true,
|
| 95 | + 'no_space_around_double_colon' => true, |
90 | 96 | 'no_spaces_after_function_name' => true,
|
91 | 97 | 'no_spaces_around_offset' => [
|
92 | 98 | 'positions' => [
|
|
120 | 126 | 'phpdoc_summary' => true,
|
121 | 127 | 'phpdoc_trim' => true,
|
122 | 128 | 'phpdoc_no_alias_tag' => [
|
123 |
| - 'type' => 'var', |
| 129 | + 'replacements' => [ |
| 130 | + 'type' => 'var', |
| 131 | + ], |
124 | 132 | ],
|
125 | 133 | 'phpdoc_types' => true,
|
126 | 134 | 'phpdoc_var_without_name' => true,
|
|
130 | 138 | 'no_mixed_echo_print' => [
|
131 | 139 | 'use' => 'echo',
|
132 | 140 | ],
|
133 |
| - 'braces' => true, |
134 | 141 | 'return_type_declaration' => [
|
135 | 142 | 'space_before' => 'none',
|
136 | 143 | ],
|
|
153 | 160 | 'switch_case_space' => true,
|
154 | 161 | 'switch_continue_to_break' => true,
|
155 | 162 | 'ternary_operator_spaces' => true,
|
156 |
| - 'trailing_comma_in_multiline_array' => true, |
| 163 | + 'trailing_comma_in_multiline' => [ |
| 164 | + 'elements' => [ |
| 165 | + 'arrays', |
| 166 | + ], |
| 167 | + ], |
157 | 168 | 'trim_array_spaces' => true,
|
158 | 169 | 'unary_operator_spaces' => true,
|
| 170 | + 'types_spaces' => [ |
| 171 | + 'space' => 'none', |
| 172 | + ], |
159 | 173 | 'line_ending' => true,
|
160 | 174 | 'whitespace_after_comma_in_array' => true,
|
161 | 175 | 'no_alias_functions' => true,
|
162 | 176 | 'no_unreachable_default_argument_value' => true,
|
163 |
| - 'psr4' => true, |
| 177 | + 'psr_autoloading' => true, |
164 | 178 | 'self_accessor' => true,
|
165 | 179 | ];
|
166 | 180 |
|
167 | 181 | $finder = PhpCsFixer\Finder::create()
|
168 | 182 | ->in(__DIR__);
|
169 | 183 |
|
170 |
| -$config = new PhpCsFixer\Config(); |
171 |
| -return $config |
| 184 | +return (new PhpCsFixer\Config()) |
172 | 185 | ->setRiskyAllowed(true)
|
173 | 186 | ->setRules($rules)
|
174 | 187 | ->setFinder($finder);
|
0 commit comments