Skip to content

Traits: can't phpstan-ignore alreadyNarrowedType #14993

Description

@ghbob

Bug report

I attached a demo, it runs with zero errors in the playground while actually failing when those are two separate files.

Thanks!

Code snippet that reproduces the problem

https://phpstan.org/r/cac4ff85-048e-4907-b01d-66942e2498d1

Expected output

I expected the ignore to work.

Did PHPStan help you today? Did it make you happy in any way?

Always, great tool to keep a project maintainable :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions