7
7
class Config extends CsConfig
8
8
{
9
9
/**
10
- * @var string| null
10
+ * @var null|string
11
11
*/
12
12
private $ header ;
13
13
@@ -29,41 +29,46 @@ public function __construct(string $name = 'narrowspark')
29
29
public function getRules (): array
30
30
{
31
31
$ rules = [
32
- '@PSR2 ' => true ,
33
- 'array_syntax ' => [
32
+ '@PSR2 ' => true ,
33
+ '@PHP71Migration:risky ' => true ,
34
+ 'array_syntax ' => [
34
35
'syntax ' => 'short ' ,
35
36
],
36
37
'binary_operator_spaces ' => [
37
38
'align_double_arrow ' => true ,
38
39
'align_equals ' => true ,
39
40
],
40
41
'blank_line_after_opening_tag ' => false ,
41
- 'blank_line_before_return ' => true ,
42
+ 'blank_line_before_statement ' => true ,
42
43
'cast_spaces ' => true ,
43
44
'class_keyword_remove ' => false ,
44
45
'combine_consecutive_unsets ' => true ,
45
46
'concat_space ' => [
46
47
'spacing ' => 'one ' ,
47
48
],
48
- 'declare_equal_normalize ' => true ,
49
- 'declare_strict_types ' => true ,
50
- 'dir_constant ' => true ,
51
- 'doctrine_annotation_braces ' => true ,
52
- 'doctrine_annotation_indentation ' => true ,
53
- 'doctrine_annotation_spaces ' => true ,
54
- 'ereg_to_preg ' => false ,
55
- 'function_to_constant ' => true ,
56
- 'function_typehint_space ' => true ,
57
- 'general_phpdoc_annotation_remove ' => false ,
58
- 'hash_to_slash_comment ' => true ,
59
- 'header_comment ' => false ,
60
- 'heredoc_to_nowdoc ' => true ,
61
- 'include ' => true ,
62
- 'is_null ' => true ,
63
- 'linebreak_after_opening_tag ' => true ,
64
- 'list_syntax ' => [
49
+ 'declare_equal_normalize ' => true ,
50
+ 'declare_strict_types ' => true ,
51
+ 'dir_constant ' => true ,
52
+ 'doctrine_annotation_braces ' => true ,
53
+ 'doctrine_annotation_array_assignment ' => true ,
54
+ 'doctrine_annotation_indentation ' => true ,
55
+ 'doctrine_annotation_spaces ' => true ,
56
+ 'ereg_to_preg ' => false ,
57
+ 'function_to_constant ' => true ,
58
+ 'function_typehint_space ' => true ,
59
+ 'general_phpdoc_annotation_remove ' => false ,
60
+ 'header_comment ' => false ,
61
+ 'heredoc_to_nowdoc ' => true ,
62
+ 'include ' => true ,
63
+ 'is_null ' => true ,
64
+ 'linebreak_after_opening_tag ' => true ,
65
+ 'list_syntax ' => [
65
66
'syntax ' => 'short ' ,
66
67
],
68
+ 'method_argument_space ' => [
69
+ 'ensure_fully_multiline ' => true ,
70
+ 'keep_multiple_spaces_after_comma ' => false ,
71
+ ],
67
72
'lowercase_cast ' => true ,
68
73
'mb_str_functions ' => true ,
69
74
'magic_constant_casing ' => true ,
@@ -91,6 +96,7 @@ public function getRules(): array
91
96
'use ' ,
92
97
'useTrait ' ,
93
98
],
99
+ 'no_null_property_initialization ' => true ,
94
100
'no_leading_import_slash ' => true ,
95
101
'no_leading_namespace_whitespace ' => true ,
96
102
'no_mixed_echo_print ' => [
@@ -112,7 +118,6 @@ public function getRules(): array
112
118
'no_useless_return ' => true ,
113
119
'no_whitespace_before_comma_in_array ' => true ,
114
120
'no_whitespace_in_blank_line ' => true ,
115
- 'non_printable_character ' => true ,
116
121
'normalize_index_brace ' => true ,
117
122
'not_operator_with_space ' => false ,
118
123
'not_operator_with_successor_space ' => true ,
@@ -127,19 +132,20 @@ public function getRules(): array
127
132
'phpdoc_add_missing_param_annotation ' => [
128
133
'only_untyped ' => false ,
129
134
],
130
- 'phpdoc_align ' => true ,
131
- 'phpdoc_annotation_without_dot ' => true ,
132
- 'phpdoc_indent ' => true ,
133
- 'phpdoc_inline_tag ' => true ,
134
- 'phpdoc_no_access ' => true ,
135
- 'phpdoc_no_alias_tag ' => [
135
+ 'phpdoc_align ' => true ,
136
+ 'phpdoc_annotation_without_dot ' => true ,
137
+ 'phpdoc_indent ' => true ,
138
+ 'phpdoc_inline_tag ' => true ,
139
+ 'phpdoc_no_access ' => true ,
140
+ 'phpdoc_no_alias_tag ' => [
136
141
'type ' => 'var ' ,
137
142
],
138
143
'phpdoc_no_empty_return ' => false ,
139
144
'phpdoc_no_package ' => true ,
140
145
'phpdoc_no_useless_inheritdoc ' => true ,
141
146
'phpdoc_return_self_reference ' => true ,
142
147
'phpdoc_order ' => true ,
148
+ 'phpdoc_types_order ' => true ,
143
149
'phpdoc_scalar ' => true ,
144
150
'phpdoc_separation ' => true ,
145
151
'phpdoc_single_line_var_spacing ' => true ,
@@ -148,15 +154,14 @@ public function getRules(): array
148
154
'phpdoc_trim ' => true ,
149
155
'phpdoc_types ' => true ,
150
156
'phpdoc_var_without_name ' => true ,
151
- 'pow_to_exponentiation ' => true ,
152
157
'pre_increment ' => true ,
153
158
'protected_to_private ' => true ,
154
159
'psr0 ' => false ,
155
160
'psr4 ' => true ,
156
- 'random_api_migration ' => true ,
157
161
'return_type_declaration ' => true ,
158
162
'self_accessor ' => false , // it causes an edge case error
159
163
'semicolon_after_instruction ' => true ,
164
+ 'single_line_comment_style ' => true ,
160
165
'short_scalar_cast ' => true ,
161
166
'silenced_deprecation_error ' => false ,
162
167
'simplified_null_return ' => false ,
@@ -171,11 +176,6 @@ public function getRules(): array
171
176
'trailing_comma_in_multiline_array ' => true ,
172
177
'trim_array_spaces ' => true ,
173
178
'unary_operator_spaces ' => true ,
174
- 'visibility_required ' => [
175
- 'const ' ,
176
- 'property ' ,
177
- 'method ' ,
178
- ],
179
179
'whitespace_after_comma_in_array ' => true ,
180
180
];
181
181
0 commit comments