Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Enable namespaces option of no_unneeded_braces fixer #1036

Merged
merged 1 commit into from Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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