You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
array_filter is already understanding complex closures or arrow functions via ArrayFilterFunctionReturnTypeReturnTypeExtension but interestingly it can't deal with more simple string-callables like is_string. Would be great if it could understand that as well.
It looks like TypeSpecifyingFunctionsDynamicReturnTypeExtension is dealing with the narrowing-down of those simple type specifying functions and therefore maybe somehow related.
Feature request
array_filter
is already understanding complex closures or arrow functions viaArrayFilterFunctionReturnTypeReturnTypeExtension
but interestingly it can't deal with more simple string-callables likeis_string
. Would be great if it could understand that as well.It looks like
TypeSpecifyingFunctionsDynamicReturnTypeExtension
is dealing with the narrowing-down of those simple type specifying functions and therefore maybe somehow related.See https://phpstan.org/r/33b86b4b-41ae-4953-b062-80d11a74ffb2
Did PHPStan help you today? Did it make you happy in any way?
Yes for sure. And I was impressed that it can narrow down arrays to lists via
$a === array_values($a)
:)The text was updated successfully, but these errors were encountered: