-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
phpstan/phpstan-src
#305Labels
Milestone
Description
Bug report
Return type of some functions (such array_key_first, array_key_last, reset, end, array_pop, array_shift, min, max) depends on count elements in argument array.
Since PHPStan can count array size the returning type should be detected correctly but it does not.
Code snippet that reproduces the problem
https://phpstan.org/r/1317dc25-c959-4053-bf09-e3639df688e8
Expected output
I expect no errors in a snippet.
Reactions are currently unavailable