-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Bug report
PHPStan can't determine that the type of the value has already been checked in the conditional statement. It is reproducible with any type of check (instanceof, for example).
Code snippet that reproduces the problem
https://phpstan.org/r/a46b054e-feaa-421f-b1a6-7e6a2976673b
Expected output
PHPStan can "understand" that the type of the value is already checked by ::hasValue() and if it returns TRUE, it cannot be NULL.
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels