From 7f23bb0d1bcc650ecec7042eafea5b4cee86c02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Mon, 11 Jul 2022 12:42:57 +0200 Subject: [PATCH] Enhancement: Enable control_structure_braces fixer --- CHANGELOG.md | 2 ++ src/RuleSet/Php74.php | 2 +- src/RuleSet/Php80.php | 2 +- src/RuleSet/Php81.php | 2 +- test/Unit/RuleSet/Php74Test.php | 2 +- test/Unit/RuleSet/Php80Test.php | 2 +- test/Unit/RuleSet/Php81Test.php | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcf94187..004e603e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ For a full diff see [`4.4.0...main`][4.4.0...main]. ### Changed - Updated `friendsofphp/php-cs-fixer` ([#620]), by [@dependabot] +- Enabled `control_structure_braces` fixer ([#621]), by [@localheinz] ## [`4.4.0`][4.4.0] @@ -639,6 +640,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0]. [#592]: https://github.com/ergebnis/php-cs-fixer-config/pull/592 [#593]: https://github.com/ergebnis/php-cs-fixer-config/pull/593 [#620]: https://github.com/ergebnis/php-cs-fixer-config/pull/620 +[#621]: https://github.com/ergebnis/php-cs-fixer-config/pull/621 [@dependabot]: https://github.com/apps/dependabot [@linuxjuggler]: https://github.com/linuxjuggler diff --git a/src/RuleSet/Php74.php b/src/RuleSet/Php74.php index 9e51984a..20f35f4f 100644 --- a/src/RuleSet/Php74.php +++ b/src/RuleSet/Php74.php @@ -101,7 +101,7 @@ final class Php74 extends AbstractRuleSet implements ExplicitRuleSet 'constant_case' => [ 'case' => 'lower', ], - 'control_structure_braces' => false, + 'control_structure_braces' => true, 'control_structure_continuation_position' => [ 'position' => 'same_line', ], diff --git a/src/RuleSet/Php80.php b/src/RuleSet/Php80.php index 9fcbf562..54bd6eaf 100644 --- a/src/RuleSet/Php80.php +++ b/src/RuleSet/Php80.php @@ -101,7 +101,7 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet 'constant_case' => [ 'case' => 'lower', ], - 'control_structure_braces' => false, + 'control_structure_braces' => true, 'control_structure_continuation_position' => [ 'position' => 'same_line', ], diff --git a/src/RuleSet/Php81.php b/src/RuleSet/Php81.php index 3e90e0cb..5a1bbd5b 100644 --- a/src/RuleSet/Php81.php +++ b/src/RuleSet/Php81.php @@ -101,7 +101,7 @@ final class Php81 extends AbstractRuleSet implements ExplicitRuleSet 'constant_case' => [ 'case' => 'lower', ], - 'control_structure_braces' => false, + 'control_structure_braces' => true, 'control_structure_continuation_position' => [ 'position' => 'same_line', ], diff --git a/test/Unit/RuleSet/Php74Test.php b/test/Unit/RuleSet/Php74Test.php index 2f41341b..984244db 100644 --- a/test/Unit/RuleSet/Php74Test.php +++ b/test/Unit/RuleSet/Php74Test.php @@ -107,7 +107,7 @@ final class Php74Test extends ExplicitRuleSetTestCase 'constant_case' => [ 'case' => 'lower', ], - 'control_structure_braces' => false, + 'control_structure_braces' => true, 'control_structure_continuation_position' => [ 'position' => 'same_line', ], diff --git a/test/Unit/RuleSet/Php80Test.php b/test/Unit/RuleSet/Php80Test.php index 41b5120c..c28205be 100644 --- a/test/Unit/RuleSet/Php80Test.php +++ b/test/Unit/RuleSet/Php80Test.php @@ -107,7 +107,7 @@ final class Php80Test extends ExplicitRuleSetTestCase 'constant_case' => [ 'case' => 'lower', ], - 'control_structure_braces' => false, + 'control_structure_braces' => true, 'control_structure_continuation_position' => [ 'position' => 'same_line', ], diff --git a/test/Unit/RuleSet/Php81Test.php b/test/Unit/RuleSet/Php81Test.php index 10f1c01c..25534382 100644 --- a/test/Unit/RuleSet/Php81Test.php +++ b/test/Unit/RuleSet/Php81Test.php @@ -107,7 +107,7 @@ final class Php81Test extends ExplicitRuleSetTestCase 'constant_case' => [ 'case' => 'lower', ], - 'control_structure_braces' => false, + 'control_structure_braces' => true, 'control_structure_continuation_position' => [ 'position' => 'same_line', ],