Skip to content

Narrowing possible enum values using in_array() condition #7176

@xificurk

Description

@xificurk

Feature request

Add support for narrowing down the list of possible enum values using in_array condition.

Currently the narrowing down does work with plain comparison, but the same condition written using in_array call, does not work:
https://phpstan.org/r/733b6ed7-41f0-4996-bbe2-ab155b7a1c19

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

PHPStan has my back every day ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions