You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@muglug I know that the code can be rewritten to pass PHPStan check. On the other hand, it is a real
world code that works properly, so PHPStan should (and can) understand it.
Activity
ondrejmirtes commentedon Feb 10, 2018
Yes, this is currently not covered. You can add a simple
elsewith somethrow new ShouldNotHappenExceptionorreturn;if it's a blocker for you 😊muglug commentedon Feb 12, 2018
I think the problem is more just incorrect user code than anything else – that
elseifis unnecessary given the strict check. PHPStan understands the type of$ain theelsebranch:https://phpstan.org/r/13537686e551ba11a457afaaae89d98e
mhujer commentedon Feb 12, 2018
@muglug I know that the code can be rewritten to pass PHPStan check. On the other hand, it is a real
world code that works properly, so PHPStan should (and can) understand it.
ondrejmirtes commentedon Jan 12, 2019
This is fixed.
rubenrua commentedon Mar 25, 2019
Regression bug???
https://phpstan.org/r/5d5c9b3cf25c03bc581ad156eb31667b
My case:
https://phpstan.org/r/10f43f31-c8db-4dcc-9d01-46ed7648fe29
ondrejmirtes commentedon Mar 25, 2019