diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e9e90ae..6c902081 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ For a full diff see [`2.8.0...main`][2.8.0...main]. * Enabled and configured `php_unit_test_case_static_method_calls` fixer for `Ergebnis\PhpCsFixer\Config\RuleSet\PhpUnit` ([#301]), by [@localheinz] * Enabled `php_unit_set_up_tear_down_visibility` fixer for `Ergebnis\PhpCsFixer\Config\RuleSet\PhpUnit` ([#303]), by [@localheinz] +* Enabled `allow_single_line_anonymous_class_with_empty_body` option for `braces` fixer ([#306]), by [@localheinz] ### Fixed @@ -280,6 +281,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0]. [#301]: https://github.com/ergebnis/php-cs-fixer-config/pull/301 [#303]: https://github.com/ergebnis/php-cs-fixer-config/pull/303 [#304]: https://github.com/ergebnis/php-cs-fixer-config/pull/304 +[#306]: https://github.com/ergebnis/php-cs-fixer-config/pull/306 [@dependabot]: https://github.com/apps/dependabot [@linuxjuggler]: https://github.com/linuxjuggler diff --git a/src/RuleSet/Php71.php b/src/RuleSet/Php71.php index 744aa89d..8ad0a412 100644 --- a/src/RuleSet/Php71.php +++ b/src/RuleSet/Php71.php @@ -59,7 +59,9 @@ final class Php71 extends AbstractRuleSet 'yield', ], ], - 'braces' => true, + 'braces' => [ + 'allow_single_line_anonymous_class_with_empty_body' => true, + ], 'cast_spaces' => true, 'class_attributes_separation' => [ 'elements' => [ diff --git a/src/RuleSet/Php73.php b/src/RuleSet/Php73.php index f4300790..b52f9b9c 100644 --- a/src/RuleSet/Php73.php +++ b/src/RuleSet/Php73.php @@ -59,7 +59,9 @@ final class Php73 extends AbstractRuleSet 'yield', ], ], - 'braces' => true, + 'braces' => [ + 'allow_single_line_anonymous_class_with_empty_body' => true, + ], 'cast_spaces' => true, 'class_attributes_separation' => [ 'elements' => [ diff --git a/src/RuleSet/Php74.php b/src/RuleSet/Php74.php index 8b662df6..6f892f36 100644 --- a/src/RuleSet/Php74.php +++ b/src/RuleSet/Php74.php @@ -59,7 +59,9 @@ final class Php74 extends AbstractRuleSet 'yield', ], ], - 'braces' => true, + 'braces' => [ + 'allow_single_line_anonymous_class_with_empty_body' => true, + ], 'cast_spaces' => true, 'class_attributes_separation' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php71Test.php b/test/Unit/RuleSet/Php71Test.php index 56b1cb4b..917b117d 100644 --- a/test/Unit/RuleSet/Php71Test.php +++ b/test/Unit/RuleSet/Php71Test.php @@ -65,7 +65,9 @@ final class Php71Test extends AbstractRuleSetTestCase 'yield', ], ], - 'braces' => true, + 'braces' => [ + 'allow_single_line_anonymous_class_with_empty_body' => true, + ], 'cast_spaces' => true, 'class_attributes_separation' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php73Test.php b/test/Unit/RuleSet/Php73Test.php index 5345dce2..09863a3c 100644 --- a/test/Unit/RuleSet/Php73Test.php +++ b/test/Unit/RuleSet/Php73Test.php @@ -65,7 +65,9 @@ final class Php73Test extends AbstractRuleSetTestCase 'yield', ], ], - 'braces' => true, + 'braces' => [ + 'allow_single_line_anonymous_class_with_empty_body' => true, + ], 'cast_spaces' => true, 'class_attributes_separation' => [ 'elements' => [ diff --git a/test/Unit/RuleSet/Php74Test.php b/test/Unit/RuleSet/Php74Test.php index 5a30010e..40226809 100644 --- a/test/Unit/RuleSet/Php74Test.php +++ b/test/Unit/RuleSet/Php74Test.php @@ -65,7 +65,9 @@ final class Php74Test extends AbstractRuleSetTestCase 'yield', ], ], - 'braces' => true, + 'braces' => [ + 'allow_single_line_anonymous_class_with_empty_body' => true, + ], 'cast_spaces' => true, 'class_attributes_separation' => [ 'elements' => [