|
9 | 9 | ->ignoreDotFiles(true) |
10 | 10 | ->ignoreVCS(true); |
11 | 11 |
|
12 | | -return PhpCsFixer\Config::create() |
| 12 | +return (new PhpCsFixer\Config()) |
13 | 13 | ->setFinder($finder) |
14 | 14 | ->setRules([ |
15 | 15 | '@PSR2' => true, |
|
20 | 20 | ], |
21 | 21 | 'no_singleline_whitespace_before_semicolons' => true, |
22 | 22 | 'no_extra_blank_lines' => [ |
23 | | - 'break', 'case', 'continue', 'curly_brace_block', 'default', |
24 | | - 'extra', 'parenthesis_brace_block', 'return', |
25 | | - 'square_brace_block', 'switch', 'throw', 'use', 'useTrait', 'use_trait', |
| 23 | + 'tokens' => [ |
| 24 | + 'curly_brace_block', |
| 25 | + 'extra', |
| 26 | + 'parenthesis_brace_block', |
| 27 | + 'square_brace_block', |
| 28 | + 'throw', |
| 29 | + 'use', |
| 30 | + ] |
26 | 31 | ], |
27 | 32 | 'cast_spaces' => [ |
28 | 33 | 'space' => 'single', |
|
43 | 48 | // 'increment_style' => ['style' => 'post'], |
44 | 49 | 'short_scalar_cast' => true, |
45 | 50 | 'class_attributes_separation' => [ |
46 | | - 'elements' => ['const', 'method', 'property'], |
| 51 | + 'elements' => ['method' => 'one',], |
47 | 52 | ], |
48 | 53 | 'no_mixed_echo_print' => [ |
49 | 54 | 'use' => 'echo', |
|
54 | 59 | ], |
55 | 60 | 'no_empty_statement' => true, |
56 | 61 | 'unary_operator_spaces' => true, // $number ++ becomes $number++ |
57 | | - 'hash_to_slash_comment' => true, // # becomes // |
| 62 | + 'single_line_comment_style' => true, // # becomes // |
58 | 63 | 'standardize_not_equals' => true, // <> becomes != |
59 | 64 | 'native_function_casing' => true, |
60 | 65 | 'ternary_operator_spaces' => true, |
|
64 | 69 | ], |
65 | 70 | 'function_typehint_space' => true, |
66 | 71 | 'no_leading_import_slash' => true, |
67 | | - 'blank_line_before_statement' => [ |
68 | | - 'statements' => [ |
69 | | - 'break', 'case', 'continue', |
70 | | - 'declare', 'default', 'die', |
71 | | - 'do', 'exit', 'for', 'foreach', |
72 | | - 'goto', 'if', 'include', |
73 | | - 'include_once', 'require', 'require_once', |
74 | | - 'return', 'switch', 'throw', 'try', 'while', 'yield', |
75 | | - ], |
76 | | - ], |
| 72 | + 'blank_line_before_statement' => true, |
77 | 73 | 'combine_consecutive_unsets' => true, |
78 | 74 | 'method_chaining_indentation' => true, |
79 | 75 | 'no_whitespace_in_blank_line' => true, |
|
84 | 80 | 'compact_nullable_typehint' => true, |
85 | 81 | 'explicit_string_variable' => true, |
86 | 82 | 'no_leading_namespace_whitespace' => true, |
87 | | - 'trailing_comma_in_multiline_array' => true, |
| 83 | + 'trailing_comma_in_multiline' => true, |
88 | 84 | 'not_operator_with_successor_space' => true, |
89 | 85 | 'object_operator_without_whitespace' => true, |
90 | 86 | 'single_blank_line_before_namespace' => true, |
|
113 | 109 | 'protected', |
114 | 110 | 'private', |
115 | 111 | ], |
116 | | - 'sortAlgorithm' => 'none', |
| 112 | + 'sort_algorithm' => 'none', |
117 | 113 | ], |
118 | 114 | 'return_type_declaration' => [ |
119 | 115 | 'space_before' => 'none', |
|
0 commit comments