phpstan throws an error on Permission#isAllowed()'s $resource parameter as there is Resource type annotated. As PHP is case-insensitive, it resolves resource as well and phpstan handles it as error. Even if it reports ambiguousity, still it would not pass.
I'm reporting it here because as far as I know it has to be fixed by listing FQN into isAllowed() method phpDoc (see phpstan issue).
Version: 3.1.1
Bug Description
phpstan throws an error on
Permission#isAllowed()
's$resource
parameter as there isResource
type annotated. As PHP is case-insensitive, it resolvesresource
as well and phpstan handles it as error. Even if it reports ambiguousity, still it would not pass.I'm reporting it here because as far as I know it has to be fixed by listing FQN into
isAllowed()
method phpDoc (see phpstan issue).See https://phpstan.org/r/1575505f-2322-436e-8ee8-b274fe452b9c