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
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?
Bug report
When
usort
ing 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 👍
The text was updated successfully, but these errors were encountered: