
empty_loop_condition
¶Empty loop-condition must be in configured style.
Default configuration.
--- Original
+++ New
<?php
-for(;;) {
+while (true) {
foo();
}
-do {
+while (true) {
foo();
-} while(true); // do while
+} // do while
With configuration: ['style' => 'for']
.
--- Original
+++ New
<?php
-while(true) {
+for(;;) {
foo();
}
The rule is part of the following rule sets:
Using the @PhpCsFixer rule set will enable the empty_loop_condition
rule with the default config.
Using the @Symfony rule set will enable the empty_loop_condition
rule with the default config.