Jump statements, such as return
, goto
, and continue
let you change the default flow of program execution,
but jump statements that direct the control flow to the original direction are just a waste of keystrokes.
Noncompliant code example
function foo($p) {
$i = $p;
while ($i > 0) {
$i--;
continue; // Noncompliant
}
}
Compliant solution
function foo($p) {
$i = $p;
while ($i > 0) {
$i--;
}
}