Skip to content

Commit

Permalink
Merge pull request #1036 from ergebnis/feature/no-unneeded-braces
Browse files Browse the repository at this point in the history
Enhancement: Enable `namespaces` option of `no_unneeded_braces` fixer
  • Loading branch information
localheinz committed Mar 17, 2024
2 parents e1a4ae4 + d3a9425 commit 72bfa3d
Show file tree
Hide file tree
Showing 27 changed files with 28 additions and 26 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,7 @@ For a full diff see [`6.23.0...main`][6.23.0...main].

- Updated `kubawerlos/php-cs-fixer-custom-fixers` ([#1025]), by [@dependabot]
- Updated `friendsofphp/php-cs-fixer` ([#1026]), by [@dependabot]
- Enabled the `namespaces` option of `no_uneeded_braces` fixer ([#1036]), by [@localheinz]

## [`6.23.0`][6.23.0]

Expand Down Expand Up @@ -1569,6 +1570,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#1023]: https://github.com/ergebnis/php-cs-fixer-config/pull/1023
[#1025]: https://github.com/ergebnis/php-cs-fixer-config/pull/1025
[#1026]: https://github.com/ergebnis/php-cs-fixer-config/pull/1026
[#1036]: https://github.com/ergebnis/php-cs-fixer-config/pull/1036

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php53.php
Expand Up @@ -387,7 +387,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php54.php
Expand Up @@ -388,7 +388,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php55.php
Expand Up @@ -392,7 +392,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php56.php
Expand Up @@ -392,7 +392,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php70.php
Expand Up @@ -392,7 +392,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php71.php
Expand Up @@ -392,7 +392,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php72.php
Expand Up @@ -392,7 +392,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php73.php
Expand Up @@ -392,7 +392,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php74.php
Expand Up @@ -392,7 +392,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php80.php
Expand Up @@ -400,7 +400,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php81.php
Expand Up @@ -401,7 +401,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php82.php
Expand Up @@ -401,7 +401,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php83.php
Expand Up @@ -401,7 +401,7 @@ public static function create(): RuleSet
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php53Test.php
Expand Up @@ -410,7 +410,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php54Test.php
Expand Up @@ -411,7 +411,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php55Test.php
Expand Up @@ -415,7 +415,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php56Test.php
Expand Up @@ -415,7 +415,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php70Test.php
Expand Up @@ -415,7 +415,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php71Test.php
Expand Up @@ -415,7 +415,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php72Test.php
Expand Up @@ -415,7 +415,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php73Test.php
Expand Up @@ -415,7 +415,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php74Test.php
Expand Up @@ -415,7 +415,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php80Test.php
Expand Up @@ -423,7 +423,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php81Test.php
Expand Up @@ -424,7 +424,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php82Test.php
Expand Up @@ -424,7 +424,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php83Test.php
Expand Up @@ -424,7 +424,7 @@ protected function expectedRules(): Rules
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => [
'namespaces' => false,
'namespaces' => true,
],
'no_unneeded_control_parentheses' => [
'statements' => [
Expand Down

0 comments on commit 72bfa3d

Please sign in to comment.