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
After an if branch phpstan detects the variable of a wrong type. Sure moving the apply inside the if fixes the problem, but it smells a lot.
if
apply
https://phpstan.org/r/5c6d4ab7-013c-40cb-a867-da3b42288d4c
No errors
Thank you everybody for your hard work!
The text was updated successfully, but these errors were encountered:
@biozshock After the latest push in 1.8.x, PHPStan now reports different result with your code snippet:
@@ @@ -41: Parameter #1 $a of method Foo<B>::apply() expects B, B|C given. +No errors
Sorry, something went wrong.
/cc @rvanvelzen Regression test please 😊
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.
Successfully merging a pull request may close this issue.
Bug report
After an
if
branch phpstan detects the variable of a wrong type.Sure moving the
apply
inside theif
fixes the problem, but it smells a lot.Code snippet that reproduces the problem
https://phpstan.org/r/5c6d4ab7-013c-40cb-a867-da3b42288d4c
Expected output
No errors
Did PHPStan help you today? Did it make you happy in any way?
Thank you everybody for your hard work!
The text was updated successfully, but these errors were encountered: