-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
phpstan/phpstan-src
#4123Labels
Milestone
Description
Bug report
This was originally reported at rectorphp/rector#9045
When array_filter has a mixed type input, PHPStan thinks that it can return a nullable array, when array_filter only ever returns a strict array according to https://www.php.net/manual/en/function.array-filter.php and the signature within phpstan-src.
Code snippet that reproduces the problem
https://phpstan.org/r/3f0d0348-dd07-42cb-b598-1b2297e3dd4e
Expected output
I expected the dumped type to just be array, not including null.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is great - both as a project in its own right, and when extended by other things like Rector, thanks for all your hard work!
Reactions are currently unavailable