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

fix modulo operator, when handling integer-ranges without 0 #630

Merged
merged 2 commits into from Aug 20, 2021

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Aug 20, 2021

closes phpstan/phpstan#5492

it was a bit supprising that IntegerRange::fromInterval() can return a NeverType in

if ($min > $max) {
return new NeverType();
}

this adds the necessary conditions to handle the case

@ondrejmirtes ondrejmirtes merged commit b410b13 into phpstan:master Aug 20, 2021
@ondrejmirtes
Copy link
Member

Perfect, thank you!

@staabm staabm deleted the modulo-int branch August 20, 2021 10:03
@staabm
Copy link
Contributor Author

staabm commented Aug 20, 2021

Perfect, thank you!

the least I could do to give back, since I received so much support in the PRs I submitted lately <3.

thank you again!

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