|
8 | 8 | file that was distributed with this source code. |
9 | 9 | COMMENT; |
10 | 10 |
|
11 | | -return PhpCsFixer\Config::create() |
| 11 | +$fixer = new PhpCsFixer\Config(); |
| 12 | +$fixer |
12 | 13 | ->setRiskyAllowed(true) |
13 | 14 | ->setRules([ |
14 | 15 | 'encoding' => true, |
|
20 | 21 | 'function_declaration' => true, |
21 | 22 | 'indentation_type' => true, |
22 | 23 | 'line_ending' => true, |
23 | | - 'lowercase_constants' => true, |
| 24 | + 'constant_case' => ['case' => 'lower'], |
24 | 25 | 'lowercase_keywords' => true, |
25 | 26 | 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], |
26 | 27 | 'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'], |
|
47 | 48 | 'statements' => ['return'], |
48 | 49 | ], |
49 | 50 | 'cast_spaces' => true, |
50 | | - 'class_attributes_separation' => ['elements' => ['method']], |
| 51 | + 'class_attributes_separation' => ['elements' => ['method' => 'one']], |
51 | 52 | 'concat_space' => ['spacing' => 'one'], |
52 | 53 | 'declare_equal_normalize' => true, |
53 | 54 | 'function_typehint_space' => true, |
|
101 | 102 | ], |
102 | 103 | 'phpdoc_annotation_without_dot' => true, |
103 | 104 | 'phpdoc_indent' => true, |
104 | | - 'phpdoc_inline_tag' => true, |
| 105 | + 'phpdoc_inline_tag_normalizer' => true, |
105 | 106 | 'phpdoc_no_access' => true, |
106 | 107 | 'phpdoc_no_alias_tag' => true, |
107 | | - 'phpdoc_no_empty_return' => true, |
| 108 | + 'phpdoc_no_empty_return' => false, |
108 | 109 | 'phpdoc_no_package' => true, |
109 | 110 | 'phpdoc_no_useless_inheritdoc' => true, |
110 | 111 | 'phpdoc_return_self_reference' => true, |
|
131 | 132 | 'standardize_increment' => true, |
132 | 133 | 'standardize_not_equals' => true, |
133 | 134 | 'ternary_operator_spaces' => true, |
134 | | - 'trailing_comma_in_multiline_array' => false, |
| 135 | + 'trailing_comma_in_multiline' => false, |
135 | 136 | 'trim_array_spaces' => true, |
136 | 137 | 'unary_operator_spaces' => true, |
137 | 138 | 'whitespace_after_comma_in_array' => true, |
|
142 | 143 | 'method', |
143 | 144 | 'property', |
144 | 145 | ]], |
| 146 | + 'native_function_invocation' => [ |
| 147 | + 'include' => [ |
| 148 | + '@compiler_optimized' |
| 149 | + ], |
| 150 | + 'scope' => 'namespaced' |
| 151 | + ], |
| 152 | + 'native_function_type_declaration_casing' => true, |
| 153 | + 'no_alias_functions' => [ |
| 154 | + 'sets' => [ |
| 155 | + '@internal' |
| 156 | + ] |
| 157 | + ], |
145 | 158 | ]) |
146 | 159 | ->setFinder( |
147 | 160 | PhpCsFixer\Finder::create() |
|
150 | 163 | ])->exclude([ |
151 | 164 | __DIR__ . '/Resources/', |
152 | 165 | __DIR__ . '/vendor/', |
| 166 | + __DIR__ . '/.github/', |
153 | 167 | ]) |
154 | 168 | ) |
155 | 169 | ->setFormat('checkstyle') |
156 | 170 | ; |
| 171 | + |
| 172 | +return $fixer; |
0 commit comments