Skip to content

match expression incorrectly assumed to not handle remaining integer values  #6064

@jdrieghe

Description

@jdrieghe

Bug report

PHPStan has a hard time figuring out if all cases of a match expression are covered.

Code snippet that reproduces the problem

https://phpstan.org/r/c6f94246-8b4c-42c0-bc43-373e02f7e663

Expected output

All cases are covered, I did not expect an issue.

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

It helps me every day. I have yet to be disappointed by a project that is compliant with a high static analysis level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions