-
-
Notifications
You must be signed in to change notification settings - Fork 930
Closed
Labels
Milestone
Description
Bug report
Hello there 👋
We have a method that gets all kind of values, and in it an event is dispatched. The return value is the same as the given parameter. It works totally fine, but with one exception, if the passed value is type of array|false
. The return type is then array|bool
which is not correct. See the prepared example
Code snippet that reproduces the problem
https://phpstan.org/r/a057351b-dec7-449b-b8fb-86e921e2cac6
Expected output
No issue should appear
Did PHPStan help you today? Did it make you happy in any way?
We are using PHPStan on a heavy legacy code base and with its help, the code gets more stable every day, thanks for that!
LastDragon-ru