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
false type and value evaluate #5362
Comments
@SpacePossum After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
12: Parameter #1 $retry of function foo expects int, int|string given.
+14: Keyword break used outside of a loop or a switch statement.
16: Strict comparison using === between 0 and 2|string will always evaluate to false. Full report
|
thank you bot, that shows a new problem 😅 |
Sorry, there was a bug in the playground. |
no worries at all man :) thanks for all the great work! |
@SpacePossum After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-12: Parameter #1 $retry of function foo expects int, int|string given.
-16: Strict comparison using === between 0 and 2|string will always evaluate to false.
+16: Strict comparison using === between 0 and 1|2 will always evaluate to false. Full report
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
Code snippet that reproduces the problem
https://phpstan.org/r/da6a9ae4-f4a5-41b7-90f3-5fe8256808d1
I think
$retry
it always anint
besides the
string
thingy the value of$retry
can be 0,1 and 2 at this lineExpected output
no issues
Did PHPStan help you today? Did it make you happy in any way?
always makes me happy, been a great help in a lot of projects :)
The text was updated successfully, but these errors were encountered: