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
optional return in function call report an wrong error
https://phpstan.org/r/1f7d9120dfb1ba424c1c00e2de646e24
as getBar() return an object|null, the if return true only if getBar return an object, thus, we can call getId() on it.
getBar()
if
getBar
getId()
testing explicitly strict equality with null works fine as showned here
null
The text was updated successfully, but these errors were encountered:
Hi, duplicate of #1157.
Sorry, something went wrong.
No branches or pull requests
Summary of a problem or a feature request
optional return in function call report an wrong error
Code snippet that reproduces the problem
https://phpstan.org/r/1f7d9120dfb1ba424c1c00e2de646e24
Expected output
as
getBar()
return an object|null, theif
return true only ifgetBar
return an object, thus, we can callgetId()
on it.testing explicitly strict equality with
null
works fine as showned hereThe text was updated successfully, but these errors were encountered: