We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
while
for
See https://phpstan.org/r/2930c63b-1ea1-4711-9272-a4de8f998a82
In the while loop, 0 and null are treated the same way, which might create bugs (in the same way it can occur for if condition).
0
null
Same idea for the for loop condition $j which might be a typo, missing the real condition.
$j
WDYT about extending the BooleanInCondition to while and for loop @ondrejmirtes ?
I dunno it the for loop need to allow empty expression like
for ($i = 1; ; $i++) { if ($i > 10) { break; } echo $i; }
The text was updated successfully, but these errors were encountered:
Yeah, sure, makes sense. There are more blindspots:
We might be able to find more by searching for $cond in PHP-Parser.
$cond
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
See https://phpstan.org/r/2930c63b-1ea1-4711-9272-a4de8f998a82
In the while loop,
0
andnull
are treated the same way, which might create bugs (in the same way it can occur for if condition).Same idea for the for loop condition
$j
which might be a typo, missing the real condition.WDYT about extending the BooleanInCondition to while and for loop @ondrejmirtes ?
I dunno it the for loop need to allow empty expression like
The text was updated successfully, but these errors were encountered: