Skip to content

Commit

Permalink
Merge pull request #477 from ergebnis/feature/empty-loop-body
Browse files Browse the repository at this point in the history
Enhancement: Enable and configure `empty_loop_body` fixer
  • Loading branch information
localheinz committed Aug 30, 2021
2 parents 39a25e1 + 6736dd4 commit d644c57
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ For a full diff see [`3.0.2...main`][3.0.2...main].

* Updated `friendsofphp/php-cs-fixer` ([#475]), by [@dependabot]
* Enabled `declare_parentheses` fixer ([#476]), by [@localheinz]
* Enabled and configured `empty_loop_body` fixer ([#477]), by [@localheinz]

## [`3.0.2`][3.0.2]

Expand Down Expand Up @@ -468,6 +469,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#462]: https://github.com/ergebnis/php-cs-fixer-config/pull/462
[#475]: https://github.com/ergebnis/php-cs-fixer-config/pull/475
[#476]: https://github.com/ergebnis/php-cs-fixer-config/pull/476
[#477]: https://github.com/ergebnis/php-cs-fixer-config/pull/477

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php73.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,9 @@ final class Php73 extends AbstractRuleSet implements ExplicitRuleSet
'shorten_simple_statements_only' => true,
],
'elseif' => true,
'empty_loop_body' => false,
'empty_loop_body' => [
'style' => 'braces',
],
'encoding' => true,
'ereg_to_preg' => true,
'error_suppression' => [
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php74.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,9 @@ final class Php74 extends AbstractRuleSet implements ExplicitRuleSet
'shorten_simple_statements_only' => true,
],
'elseif' => true,
'empty_loop_body' => false,
'empty_loop_body' => [
'style' => 'braces',
],
'encoding' => true,
'ereg_to_preg' => true,
'error_suppression' => [
Expand Down
4 changes: 3 additions & 1 deletion src/RuleSet/Php80.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,9 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet
'shorten_simple_statements_only' => true,
],
'elseif' => true,
'empty_loop_body' => false,
'empty_loop_body' => [
'style' => 'braces',
],
'encoding' => true,
'ereg_to_preg' => true,
'error_suppression' => [
Expand Down
4 changes: 3 additions & 1 deletion test/Unit/RuleSet/Php73Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,9 @@ final class Php73Test extends ExplicitRuleSetTestCase
'shorten_simple_statements_only' => true,
],
'elseif' => true,
'empty_loop_body' => false,
'empty_loop_body' => [
'style' => 'braces',
],
'encoding' => true,
'ereg_to_preg' => true,
'error_suppression' => [
Expand Down
4 changes: 3 additions & 1 deletion test/Unit/RuleSet/Php74Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,9 @@ final class Php74Test extends ExplicitRuleSetTestCase
'shorten_simple_statements_only' => true,
],
'elseif' => true,
'empty_loop_body' => false,
'empty_loop_body' => [
'style' => 'braces',
],
'encoding' => true,
'ereg_to_preg' => true,
'error_suppression' => [
Expand Down
4 changes: 3 additions & 1 deletion test/Unit/RuleSet/Php80Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,9 @@ final class Php80Test extends ExplicitRuleSetTestCase
'shorten_simple_statements_only' => true,
],
'elseif' => true,
'empty_loop_body' => false,
'empty_loop_body' => [
'style' => 'braces',
],
'encoding' => true,
'ereg_to_preg' => true,
'error_suppression' => [
Expand Down

0 comments on commit d644c57

Please sign in to comment.