diff --git a/CHANGELOG.md b/CHANGELOG.md index 1092b926..f246cf57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), For a full diff see [`6.15.0...main`][6.15.0...main]. +### Changed + +- Updated `friendsofphp/php-cs-fixer` ([#967]), by [@dependabot] + ## [`6.15.0`][6.15.0] For a full diff see [`6.14.0...6.15.0`][6.14.0...6.15.0]. @@ -1430,6 +1434,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0]. [#956]: https://github.com/ergebnis/php-cs-fixer-config/pull/956 [#962]: https://github.com/ergebnis/php-cs-fixer-config/pull/962 [#963]: https://github.com/ergebnis/php-cs-fixer-config/pull/963 +[#967]: https://github.com/ergebnis/php-cs-fixer-config/pull/967 [@dependabot]: https://github.com/apps/dependabot [@linuxjuggler]: https://github.com/linuxjuggler diff --git a/composer.json b/composer.json index 28a39c75..b17c2033 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "ext-filter": "*", "erickskrauch/php-cs-fixer-custom-fixers": "~1.2.1", - "friendsofphp/php-cs-fixer": "~3.42.0", + "friendsofphp/php-cs-fixer": "~3.43.0", "kubawerlos/php-cs-fixer-custom-fixers": "~3.17.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index dc2d15b8..ebe69df1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2c73e0bc7ef2aa4012ac604b66cf13ed", + "content-hash": "ac7dd97afebf8a071c9905ce55a32345", "packages": [ { "name": "composer/pcre", @@ -288,16 +288,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.42.0", + "version": "v3.43.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "632ef1be3447a9b890bef06147475facee535d0f" + "reference": "39b5632c39ca9deb4eb7e670ba96fcf5c3a72e3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/632ef1be3447a9b890bef06147475facee535d0f", - "reference": "632ef1be3447a9b890bef06147475facee535d0f", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/39b5632c39ca9deb4eb7e670ba96fcf5c3a72e3c", + "reference": "39b5632c39ca9deb4eb7e670ba96fcf5c3a72e3c", "shasum": "" }, "require": { @@ -327,7 +327,7 @@ "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4", - "phpunit/phpunit": "^9.6", + "phpunit/phpunit": "^9.6 || ^10.5.5", "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { @@ -366,7 +366,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.42.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.43.0" }, "funding": [ { @@ -374,7 +374,7 @@ "type": "github" } ], - "time": "2023-12-24T14:38:51+00:00" + "time": "2023-12-28T17:36:39+00:00" }, { "name": "kubawerlos/php-cs-fixer-custom-fixers", 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' => [