Skip to content

False-positive: Method never returns XX so it can be removed from the return type. #10312

@staabm

Description

@staabm

Bug report

when using constant enumerations, phpstan reports a type should be removed from the return type - which does not make sense in this case

Code snippet that reproduces the problem

https://phpstan.org/r/2e1815d0-1ecd-4ad5-b4f0-195c7c420689

Expected output

no error

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

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions