You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Going out of PHP breaks recognition of scope for alternative control structure syntax.
In the below code sample, the continue in the first example has the T_FOR token as a condition in the tokens array, while the continue in the second example does not.
for ($x=0;$x<5;$x++):
if ($x) continue;
endfor;
for ($x=0;$x<5;$x++):
if ($x) continue?><?php
endfor;
This bug exists in both the PHPCS 2.x as well as the PHPCS 3.x branches.
The text was updated successfully, but these errors were encountered:
gsherwood
changed the title
Tokenizer bug: alternative control structure syntax not always recognized as scoped.
Alternative control structure syntax not always recognized as scoped
Jun 29, 2017
Going out of PHP breaks recognition of scope for alternative control structure syntax.
In the below code sample, the
continue
in the first example has theT_FOR
token as a condition in the tokens array, while thecontinue
in the second example does not.This bug exists in both the PHPCS 2.x as well as the PHPCS 3.x branches.
The text was updated successfully, but these errors were encountered: