Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit f7f88b1

Browse files
authored
Fix deprecated messages (#13)
1 parent a5a72a0 commit f7f88b1

File tree

2 files changed

+63
-63
lines changed

2 files changed

+63
-63
lines changed

src/Config.php

+50-50
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,18 @@ public function getRules(): array
8585
'no_empty_phpdoc' => true,
8686
'no_empty_statement' => true,
8787
'no_extra_consecutive_blank_lines' => [
88-
'break',
89-
'continue',
90-
'curly_brace_block',
91-
'extra',
92-
'parenthesis_brace_block',
93-
'return',
94-
'square_brace_block',
95-
'throw',
96-
'use',
97-
'useTrait',
88+
'tokens' => [
89+
'break',
90+
'continue',
91+
'curly_brace_block',
92+
'extra',
93+
'parenthesis_brace_block',
94+
'return',
95+
'square_brace_block',
96+
'throw',
97+
'use',
98+
'use_trait',
99+
],
98100
],
99101
'no_null_property_initialization' => true,
100102
'no_leading_import_slash' => true,
@@ -137,46 +139,44 @@ public function getRules(): array
137139
'phpdoc_indent' => true,
138140
'phpdoc_inline_tag' => true,
139141
'phpdoc_no_access' => true,
140-
'phpdoc_no_alias_tag' => [
141-
'type' => 'var',
142-
],
143-
'phpdoc_no_empty_return' => false,
144-
'phpdoc_no_package' => true,
145-
'phpdoc_no_useless_inheritdoc' => true,
146-
'phpdoc_return_self_reference' => true,
147-
'phpdoc_order' => true,
148-
'phpdoc_types_order' => true,
149-
'phpdoc_scalar' => true,
150-
'phpdoc_separation' => true,
151-
'phpdoc_single_line_var_spacing' => true,
152-
'phpdoc_summary' => true,
153-
'phpdoc_to_comment' => true,
154-
'phpdoc_trim' => true,
155-
'phpdoc_types' => true,
156-
'phpdoc_var_without_name' => true,
157-
'pre_increment' => true,
158-
'protected_to_private' => true,
159-
'psr0' => false,
160-
'psr4' => true,
161-
'return_type_declaration' => true,
162-
'self_accessor' => false, // it causes an edge case error
163-
'semicolon_after_instruction' => true,
164-
'single_line_comment_style' => true,
165-
'short_scalar_cast' => true,
166-
'silenced_deprecation_error' => false,
167-
'simplified_null_return' => false,
168-
'single_blank_line_before_namespace' => false,
169-
'single_quote' => true,
170-
'space_after_semicolon' => true,
171-
'standardize_not_equals' => true,
172-
'strict_comparison' => false, // risky
173-
'strict_param' => true, // risky
174-
'ternary_operator_spaces' => true,
175-
'ternary_to_null_coalescing' => true,
176-
'trailing_comma_in_multiline_array' => true,
177-
'trim_array_spaces' => true,
178-
'unary_operator_spaces' => true,
179-
'whitespace_after_comma_in_array' => true,
142+
'phpdoc_no_alias_tag' => true,
143+
'phpdoc_no_empty_return' => false,
144+
'phpdoc_no_package' => true,
145+
'phpdoc_no_useless_inheritdoc' => true,
146+
'phpdoc_return_self_reference' => true,
147+
'phpdoc_order' => true,
148+
'phpdoc_types_order' => true,
149+
'phpdoc_scalar' => true,
150+
'phpdoc_separation' => true,
151+
'phpdoc_single_line_var_spacing' => true,
152+
'phpdoc_summary' => true,
153+
'phpdoc_to_comment' => true,
154+
'phpdoc_trim' => true,
155+
'phpdoc_types' => true,
156+
'phpdoc_var_without_name' => true,
157+
'pre_increment' => true,
158+
'protected_to_private' => true,
159+
'psr0' => false,
160+
'psr4' => true,
161+
'return_type_declaration' => true,
162+
'self_accessor' => false, // it causes an edge case error
163+
'semicolon_after_instruction' => true,
164+
'single_line_comment_style' => true,
165+
'short_scalar_cast' => true,
166+
'silenced_deprecation_error' => false,
167+
'simplified_null_return' => false,
168+
'single_blank_line_before_namespace' => false,
169+
'single_quote' => true,
170+
'space_after_semicolon' => true,
171+
'standardize_not_equals' => true,
172+
'strict_comparison' => false, // risky
173+
'strict_param' => true, // risky
174+
'ternary_operator_spaces' => true,
175+
'ternary_to_null_coalescing' => true,
176+
'trailing_comma_in_multiline_array' => true,
177+
'trim_array_spaces' => true,
178+
'unary_operator_spaces' => true,
179+
'whitespace_after_comma_in_array' => true,
180180
];
181181

182182
if ($this->header !== null) {

tests/ConfigTest.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,18 @@ private function getSymfonyRules(): array
284284
'no_empty_phpdoc' => true,
285285
'no_empty_statement' => true,
286286
'no_extra_consecutive_blank_lines' => [
287-
'break',
288-
'continue',
289-
'curly_brace_block',
290-
'extra',
291-
'parenthesis_brace_block',
292-
'return',
293-
'square_brace_block',
294-
'throw',
295-
'use',
296-
'useTrait',
287+
'tokens' => [
288+
'break',
289+
'continue',
290+
'curly_brace_block',
291+
'extra',
292+
'parenthesis_brace_block',
293+
'return',
294+
'square_brace_block',
295+
'throw',
296+
'use',
297+
'use_trait',
298+
],
297299
],
298300
'no_null_property_initialization' => true,
299301
'no_leading_import_slash' => true,
@@ -322,9 +324,7 @@ private function getSymfonyRules(): array
322324
'phpdoc_indent' => true,
323325
'phpdoc_inline_tag' => true,
324326
'phpdoc_no_access' => true,
325-
'phpdoc_no_alias_tag' => [
326-
'type' => 'var',
327-
],
327+
'phpdoc_no_alias_tag' => true,
328328
'phpdoc_no_empty_return' => false,
329329
'phpdoc_no_package' => true,
330330
'phpdoc_no_useless_inheritdoc' => true,

0 commit comments

Comments
 (0)