Skip to content
New issue

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

Check for boolean in while conditions #260

Open
wants to merge 1 commit into
base: 2.0.x
Choose a base branch
from

Conversation

VincentLanglet
Copy link
Contributor

Might be enough to close #259

I tried to implement the same thing for For_.

But the issue I encounter in

for ($i = 0; $i; $i++) {}

is that $i is considered as a MixedType, which is non explicit, so BooleanHelper::passesAsBoolean always return true.

So i'm unsure the rule is doable for for loops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check BooleanInCondition for while and for loop
1 participant