-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
phpstan/phpstan-src
#3053Description
Feature request
It would be nice if a match(count($array)) would narrow the type $array to non-empty-array for any cases which aren't 0.
See this example: https://phpstan.org/r/d7a823e1-d74d-4544-b282-9bab5d449198
When using if / else it properly knows that the $array can't be empty anymore, but when using match(count(...)) that's not the case.
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