-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Milestone
Description
Bug report
Hello,
Recent change in return type of sort causes following problem:
https://phpstan.org/r/da32d2f1-4f3c-476f-b381-c3a7775c03da
When line 8 is commented out, it works as expected. Sort now returns list as a type. Line 9 changes type to string. Therefore line 10 should not have any errors.
I think it breaks only if arrays have more dimensions like in the example.
Code snippet that reproduces the problem
https://phpstan.org/r/da32d2f1-4f3c-476f-b381-c3a7775c03da
Expected output
No errors
Did PHPStan help you today? Did it make you happy in any way?
Absolutely, I can't live without it.
Reactions are currently unavailable