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
Conditional param type should provide the same analysis as condition in code #7915
Comments
I think I encountered the same issue. |
another repro: https://phpstan.org/r/64dc6844-30b6-4bf4-8ed2-416fefc2203c |
Implemented: phpstan/phpstan-src#2548 |
But this is a regression.. You have no way to enforce the parameter value inside the function, so I do prefer phpstan to tell me that it can still be both. |
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. |
Feature request
demo: https://phpstan.org/r/db87d84e-9483-4a85-9506-39e25605ee7a
I would expect
to be strictly equal to
+
The text was updated successfully, but these errors were encountered: