-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Milestone
Description
Bug report
When usorting an array, the array gets converted to a list, but PHPStan thinks it is not.
It seems that PHPStorm inspects the array before sorting it, maybe because usort takes the array as reference?
Code snippet that reproduces the problem
https://phpstan.org/r/8f5bf8e6-ba7a-4180-a1cf-7adf0a57fe0a
Expected output
There should be no issue detected.
The same snippet executed in PHP (https://3v4l.org/nHSkZ) results in no error
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is aweseome! Thanks for your hard work. We use it in our projects for a long time now, with level: max and strict rules 👍
Reactions are currently unavailable