|
4 | 4 | ->files() |
5 | 5 | ->in([ |
6 | 6 | __DIR__ . '/src', |
7 | | - __DIR__ . '/tests' |
8 | | - ]) |
9 | | - ->notName('*.phpt'); |
| 7 | + __DIR__ . '/tests', |
| 8 | + ]); |
10 | 9 |
|
11 | 10 | if (!\file_exists(__DIR__ . '/var')) { |
12 | 11 | \mkdir(__DIR__ . '/var'); |
|
16 | 15 | * This configuration was taken from https://github.com/sebastianbergmann/phpunit/blob/master/.php_cs.dist |
17 | 16 | * and slightly adjusted. |
18 | 17 | */ |
19 | | -return PhpCsFixer\Config::create() |
| 18 | +$config = new PhpCsFixer\Config(); |
| 19 | + |
| 20 | +return $config |
20 | 21 | ->setRiskyAllowed(true) |
21 | 22 | ->setCacheFile(__DIR__.'/var/.php_cs.cache') |
22 | 23 | ->setRules([ |
|
30 | 31 | 'continue', |
31 | 32 | 'declare', |
32 | 33 | 'default', |
33 | | - 'die', |
34 | 34 | 'do', |
35 | 35 | 'exit', |
36 | 36 | 'for', |
|
50 | 50 | ], |
51 | 51 | 'braces' => true, |
52 | 52 | 'cast_spaces' => true, |
53 | | - 'class_attributes_separation' => ['elements' => ['const', 'method', 'property']], |
| 53 | + 'class_attributes_separation' => ['elements' => ['const'=>'one', 'method'=>'one', 'property'=>'one']], |
54 | 54 | 'combine_consecutive_issets' => true, |
55 | 55 | 'combine_consecutive_unsets' => true, |
56 | 56 | 'compact_nullable_typehint' => true, |
|
61 | 61 | 'dir_constant' => true, |
62 | 62 | 'elseif' => true, |
63 | 63 | 'encoding' => true, |
| 64 | + 'echo_tag_syntax' => true, |
64 | 65 | 'explicit_indirect_variable' => true, |
65 | 66 | 'explicit_string_variable' => true, |
66 | 67 | 'full_opening_tag' => true, |
|
85 | 86 | 'lowercase_static_reference' => true, |
86 | 87 | 'magic_constant_casing' => true, |
87 | 88 | 'magic_method_casing' => true, |
88 | | - 'method_argument_space' => ['ensure_fully_multiline' => true], |
| 89 | + 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], |
89 | 90 | 'modernize_types_casting' => false, |
90 | 91 | 'multiline_comment_opening_closing' => true, |
91 | 92 | 'multiline_whitespace_before_semicolons' => true, |
92 | 93 | 'native_constant_invocation' => false, |
93 | 94 | 'native_function_casing' => false, |
94 | | - 'native_function_invocation' => true, |
| 95 | + 'native_function_invocation' => ['include'=>['@all']], |
95 | 96 | 'native_function_type_declaration_casing' => true, |
96 | 97 | 'new_with_braces' => false, |
97 | 98 | 'no_alias_functions' => true, |
|
112 | 113 | 'no_null_property_initialization' => true, |
113 | 114 | 'no_php4_constructor' => true, |
114 | 115 | 'no_short_bool_cast' => true, |
115 | | - 'no_short_echo_tag' => true, |
116 | 116 | 'no_singleline_whitespace_before_semicolons' => true, |
117 | 117 | 'no_spaces_after_function_name' => true, |
118 | 118 | 'no_spaces_around_offset' => true, |
|
208 | 208 | 'standardize_not_equals' => true, |
209 | 209 | 'strict_param' => true, |
210 | 210 | 'ternary_to_null_coalescing' => true, |
211 | | - 'trailing_comma_in_multiline_array' => true, |
| 211 | + 'trailing_comma_in_multiline' => true, |
212 | 212 | 'trim_array_spaces' => true, |
213 | 213 | 'unary_operator_spaces' => true, |
214 | 214 | 'visibility_required' => [ |
|
0 commit comments