Empty loop-condition must be in configured style.
Style of empty loop-condition.
Allowed values: 'for'
and 'while'
Default value: 'while'
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: