-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
Unable to deduce a complex logic #3190
Comments
Yes, there's a milestone with issues like these: https://github.com/phpstan/phpstan/milestone/12 You're better off rewriting the code so that PHPStan understands it, it's not hard: https://phpstan.org/r/7171be46-1c3b-44fd-8d34-6cb3d3ea46ba |
@Einenlum After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-15: Call to an undefined method object::getSize().
+No errors |
@Einenlum After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-15: Call to an undefined method object::getSize().
+No errors |
Fixed: phpstan/phpstan-src@56ae015 |
Thank you very much 🙏 |
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
(Sorry for the title, could not find one describing the issue. If you have one, you're very welcome to edit it)
Found an interesting bug. This is complex to solve, I think, but still, phpstan produces a warning when it should not. I know it's really far-fetched and this code should be refactored anyway, but I found this false positive report in an old legacy code.
$dedicated
can only betrue
when$component
is an instance ofServer
.Code snippet that reproduces the problem
Expected output
Should raise no error.
The text was updated successfully, but these errors were encountered: