Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Static analysis fails for Permission#isAllowed() – Resource $resource is ambiguous #56

Description

@dakur

Version: 3.1.1

Bug Description

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).

See https://phpstan.org/r/1575505f-2322-436e-8ee8-b274fe452b9c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions