Skip to content

Commit

Permalink
Enhancement: Enable and configure empty_loop_condition fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Oct 5, 2021
1 parent 92478ea commit 450aea6
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 @@ -13,6 +13,7 @@ For a full diff see [`3.0.2...main`][3.0.2...main].
* Updated `friendsofphp/php-cs-fixer` ([#495]), by [@dependabot]
* Enabled `assign_null_coalescing_to_coalesce_equal` fixer in `Php74` and `Php80` rule sets ([#497]), by [@localheinz]
* Enabled and configured `control_structure_continuation_position` fixer ([#498]), by [@localheinz]
* Enabled and configured `empty_loop_condition` fixer ([#499]), by [@localheinz]

### Fixed

Expand Down Expand Up @@ -500,6 +501,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#496]: https://github.com/ergebnis/php-cs-fixer-config/pull/496
[#497]: https://github.com/ergebnis/php-cs-fixer-config/pull/497
[#498]: https://github.com/ergebnis/php-cs-fixer-config/pull/498
[#499]: https://github.com/ergebnis/php-cs-fixer-config/pull/499

[@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 @@ -137,7 +137,9 @@ final class Php73 extends AbstractRuleSet implements ExplicitRuleSet
'empty_loop_body' => [
'style' => 'braces',
],
'empty_loop_condition' => false,
'empty_loop_condition' => [
'style' => 'while',
],
'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 @@ -137,7 +137,9 @@ final class Php74 extends AbstractRuleSet implements ExplicitRuleSet
'empty_loop_body' => [
'style' => 'braces',
],
'empty_loop_condition' => false,
'empty_loop_condition' => [
'style' => 'while',
],
'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 @@ -137,7 +137,9 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet
'empty_loop_body' => [
'style' => 'braces',
],
'empty_loop_condition' => false,
'empty_loop_condition' => [
'style' => 'while',
],
'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 @@ -143,7 +143,9 @@ final class Php73Test extends ExplicitRuleSetTestCase
'empty_loop_body' => [
'style' => 'braces',
],
'empty_loop_condition' => false,
'empty_loop_condition' => [
'style' => 'while',
],
'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 @@ -143,7 +143,9 @@ final class Php74Test extends ExplicitRuleSetTestCase
'empty_loop_body' => [
'style' => 'braces',
],
'empty_loop_condition' => false,
'empty_loop_condition' => [
'style' => 'while',
],
'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 @@ -143,7 +143,9 @@ final class Php80Test extends ExplicitRuleSetTestCase
'empty_loop_body' => [
'style' => 'braces',
],
'empty_loop_condition' => false,
'empty_loop_condition' => [
'style' => 'while',
],
'encoding' => true,
'ereg_to_preg' => true,
'error_suppression' => [
Expand Down

0 comments on commit 450aea6

Please sign in to comment.