From de51100759355dbb525a19d8028e6edad416731f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Thu, 28 Dec 2023 19:20:17 +0100 Subject: [PATCH] Fix: Configure newly added options --- src/RuleSet/Php53.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php54.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php55.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php56.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php70.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php71.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php72.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php73.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php74.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php80.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php81.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php82.php | 30 ++++++++++++++++++++++++++++-- src/RuleSet/Php83.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php53Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php54Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php55Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php56Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php70Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php71Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php72Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php73Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php74Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php80Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php81Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php82Test.php | 30 ++++++++++++++++++++++++++++-- test/Unit/RuleSet/Php83Test.php | 30 ++++++++++++++++++++++++++++-- 26 files changed, 728 insertions(+), 52 deletions(-) diff --git a/src/RuleSet/Php53.php b/src/RuleSet/Php53.php index 18997b7c..4c6350d3 100644 --- a/src/RuleSet/Php53.php +++ b/src/RuleSet/Php53.php @@ -218,6 +218,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -795,7 +817,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -823,7 +847,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php54.php b/src/RuleSet/Php54.php index 6c684d31..b450aba8 100644 --- a/src/RuleSet/Php54.php +++ b/src/RuleSet/Php54.php @@ -219,6 +219,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -797,7 +819,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -825,7 +849,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php55.php b/src/RuleSet/Php55.php index b8b4319d..7c445221 100644 --- a/src/RuleSet/Php55.php +++ b/src/RuleSet/Php55.php @@ -221,6 +221,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -808,7 +830,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -836,7 +860,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php56.php b/src/RuleSet/Php56.php index 5299ff95..ca4816ca 100644 --- a/src/RuleSet/Php56.php +++ b/src/RuleSet/Php56.php @@ -221,6 +221,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -808,7 +830,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -836,7 +860,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php70.php b/src/RuleSet/Php70.php index 59079772..dfcef484 100644 --- a/src/RuleSet/Php70.php +++ b/src/RuleSet/Php70.php @@ -221,6 +221,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -808,7 +830,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -836,7 +860,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php71.php b/src/RuleSet/Php71.php index f7806974..bb6e7ab7 100644 --- a/src/RuleSet/Php71.php +++ b/src/RuleSet/Php71.php @@ -221,6 +221,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -810,7 +832,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -838,7 +862,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php72.php b/src/RuleSet/Php72.php index 2a5fee5b..91a862fc 100644 --- a/src/RuleSet/Php72.php +++ b/src/RuleSet/Php72.php @@ -221,6 +221,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -810,7 +832,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -838,7 +862,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php73.php b/src/RuleSet/Php73.php index 0fa1254b..118846c4 100644 --- a/src/RuleSet/Php73.php +++ b/src/RuleSet/Php73.php @@ -221,6 +221,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -810,7 +832,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -839,7 +863,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php74.php b/src/RuleSet/Php74.php index 245354db..6cbcfd52 100644 --- a/src/RuleSet/Php74.php +++ b/src/RuleSet/Php74.php @@ -221,6 +221,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -812,7 +834,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -842,7 +866,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php80.php b/src/RuleSet/Php80.php index 624ff2c2..b04c9957 100644 --- a/src/RuleSet/Php80.php +++ b/src/RuleSet/Php80.php @@ -223,6 +223,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -821,7 +843,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -853,7 +877,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php81.php b/src/RuleSet/Php81.php index 92308435..c7612ff3 100644 --- a/src/RuleSet/Php81.php +++ b/src/RuleSet/Php81.php @@ -224,6 +224,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -824,7 +846,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -856,7 +880,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php82.php b/src/RuleSet/Php82.php index 0d7c8f61..44ef5a18 100644 --- a/src/RuleSet/Php82.php +++ b/src/RuleSet/Php82.php @@ -224,6 +224,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -824,7 +846,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -856,7 +880,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/src/RuleSet/Php83.php b/src/RuleSet/Php83.php index aabe51ff..2f2de3ae 100644 --- a/src/RuleSet/Php83.php +++ b/src/RuleSet/Php83.php @@ -224,6 +224,28 @@ public static function create(): RuleSet 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -824,7 +846,9 @@ public static function create(): RuleSet ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -856,7 +880,9 @@ public static function create(): RuleSet 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php53Test.php b/test/Unit/RuleSet/Php53Test.php index 8e60c8bf..2eebf754 100644 --- a/test/Unit/RuleSet/Php53Test.php +++ b/test/Unit/RuleSet/Php53Test.php @@ -241,6 +241,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -818,7 +840,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -846,7 +870,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php54Test.php b/test/Unit/RuleSet/Php54Test.php index 2a273d38..efcddaa9 100644 --- a/test/Unit/RuleSet/Php54Test.php +++ b/test/Unit/RuleSet/Php54Test.php @@ -242,6 +242,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -820,7 +842,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -848,7 +872,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php55Test.php b/test/Unit/RuleSet/Php55Test.php index ffdff200..7e18d423 100644 --- a/test/Unit/RuleSet/Php55Test.php +++ b/test/Unit/RuleSet/Php55Test.php @@ -244,6 +244,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -831,7 +853,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -859,7 +883,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php56Test.php b/test/Unit/RuleSet/Php56Test.php index 9ccef571..fdae9f53 100644 --- a/test/Unit/RuleSet/Php56Test.php +++ b/test/Unit/RuleSet/Php56Test.php @@ -244,6 +244,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -831,7 +853,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -859,7 +883,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php70Test.php b/test/Unit/RuleSet/Php70Test.php index ab356a72..6d67d995 100644 --- a/test/Unit/RuleSet/Php70Test.php +++ b/test/Unit/RuleSet/Php70Test.php @@ -244,6 +244,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -831,7 +853,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -859,7 +883,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php71Test.php b/test/Unit/RuleSet/Php71Test.php index d167ceeb..e140c7fe 100644 --- a/test/Unit/RuleSet/Php71Test.php +++ b/test/Unit/RuleSet/Php71Test.php @@ -244,6 +244,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -833,7 +855,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -861,7 +885,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php72Test.php b/test/Unit/RuleSet/Php72Test.php index f97ac87f..1fa33074 100644 --- a/test/Unit/RuleSet/Php72Test.php +++ b/test/Unit/RuleSet/Php72Test.php @@ -244,6 +244,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -833,7 +855,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -861,7 +885,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php73Test.php b/test/Unit/RuleSet/Php73Test.php index 9baec36b..0798192e 100644 --- a/test/Unit/RuleSet/Php73Test.php +++ b/test/Unit/RuleSet/Php73Test.php @@ -244,6 +244,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -833,7 +855,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -862,7 +886,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php74Test.php b/test/Unit/RuleSet/Php74Test.php index ebb36e4d..d7d7eefa 100644 --- a/test/Unit/RuleSet/Php74Test.php +++ b/test/Unit/RuleSet/Php74Test.php @@ -244,6 +244,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -835,7 +857,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -865,7 +889,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php80Test.php b/test/Unit/RuleSet/Php80Test.php index f27d89e0..bcc7a326 100644 --- a/test/Unit/RuleSet/Php80Test.php +++ b/test/Unit/RuleSet/Php80Test.php @@ -246,6 +246,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -844,7 +866,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -876,7 +900,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php81Test.php b/test/Unit/RuleSet/Php81Test.php index ced8fa93..bfeceeb4 100644 --- a/test/Unit/RuleSet/Php81Test.php +++ b/test/Unit/RuleSet/Php81Test.php @@ -247,6 +247,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -847,7 +869,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -879,7 +903,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php82Test.php b/test/Unit/RuleSet/Php82Test.php index a56cf586..c8eb50d7 100644 --- a/test/Unit/RuleSet/Php82Test.php +++ b/test/Unit/RuleSet/Php82Test.php @@ -247,6 +247,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -847,7 +869,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -879,7 +903,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php83Test.php b/test/Unit/RuleSet/Php83Test.php index afada737..6c3d0cee 100644 --- a/test/Unit/RuleSet/Php83Test.php +++ b/test/Unit/RuleSet/Php83Test.php @@ -247,6 +247,28 @@ protected function expectedRules(): Rules 'fully_qualified_strict_types' => [ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => false, + 'phpdoc_tags' => [ + 'param', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-return', + 'phpstan-var', + 'property', + 'property-read', + 'property-write', + 'psalm-param', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-return', + 'psalm-var', + 'return', + 'see', + 'throws', + 'var', + ], ], 'function_declaration' => [ 'closure_fn_spacing' => 'one', @@ -847,7 +869,9 @@ protected function expectedRules(): Rules ], 'standardize_increment' => true, 'standardize_not_equals' => true, - 'statement_indentation' => true, + 'statement_indentation' => [ + 'stick_comment_to_next_continuous_control_statement' => false, + ], 'static_lambda' => true, 'strict_comparison' => true, 'strict_param' => true, @@ -879,7 +903,9 @@ protected function expectedRules(): Rules 'space' => 'none', 'space_multiple_catch' => 'none', ], - 'unary_operator_spaces' => true, + 'unary_operator_spaces' => [ + 'only_dec_inc' => false, + ], 'use_arrow_functions' => false, 'visibility_required' => [ 'elements' => [