Bug report
while working on phpstan/phpstan-src#2772 I realized that there is some problem in ArrayFilterFunctionReturnTypeReturnTypeExtension when working on unions.
Code snippet that reproduces the problem
https://phpstan.org/r/bb7a2e31-57a9-450c-bdc9-111e6acc7f8d
(reduced from drupal 10.0.0 real world code)
Expected output
since the arg passed to array_filter can be an array, I think the return type should not be NeverType
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
while working on phpstan/phpstan-src#2772 I realized that there is some problem in
ArrayFilterFunctionReturnTypeReturnTypeExtensionwhen working on unions.Code snippet that reproduces the problem
https://phpstan.org/r/bb7a2e31-57a9-450c-bdc9-111e6acc7f8d
(reduced from drupal 10.0.0 real world code)
Expected output
since the arg passed to
array_filtercan be an array, I think the return type should not beNeverTypeDid PHPStan help you today? Did it make you happy in any way?
No response