ForLoopWithTestFunctionCallSniff.php
Detects for-loops that use a function call in the test expression.
This rule is based on the PMD rule catalogue. Detects for-loops that use a function call in the test expression.
class Foo
{
public function bar($x)
{
$a = array(1, 2, 3, 4);
for ($i = 0; $i < count($a); $i++) {
$a[$i] *= $i;
}
}
}