Skip to content

Commit

Permalink
Enhancement: Enable namespaces option of no_unneeded_braces fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Mar 17, 2024
1 parent e1a4ae4 commit b41b11a
Show file tree
Hide file tree
Showing 27 changed files with 29 additions and 26 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ 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 `namespaces` option of `no_uneeded_braces` fixer ([#1036]), by [@localheinz]


## [`6.23.0`][6.23.0]

Expand Down Expand Up @@ -1569,6 +1571,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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 b41b11a

Please sign in to comment.