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_udiff() comparators should return an integer less than, equal to, or greater than zero according to the docs, but PHPStan raises an issue if the comparator's return type is not int<-1,1>.
Bug report
array_udiff()
comparators should return an integer less than, equal to, or greater than zero according to the docs, but PHPStan raises an issue if the comparator's return type is notint<-1,1>
.usort()
does however accept any int.Code snippet that reproduces the problem
https://phpstan.org/r/a036787e-1397-49a1-9391-891f4332df5b
Expected output
There should be no issues.
Did PHPStan help you today? Did it make you happy in any way?
It helped me catch a case where not all code paths returned a value!
The text was updated successfully, but these errors were encountered: