🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

[Enum/Trait] Call to function method_exists() will always evaluate to false #7599

Description

@Dartui

Bug report

Hello. I am facing issues with enum/trait combo. In some of my enums I have defined method, which can be used by trait. However I am getting Call to function method_exists() will always evaluate to false. in trait which does not have this method defined. I don't know if this is some false-positive or my code is simply trash 😉

Code snippet that reproduces the problem

https://phpstan.org/r/38e7fa19-60fa-4a4e-b3dd-e3ed305f13b8

Expected output

No errors.

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

Sure thing, without it quality of my work would be much worse. You did a really good job!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions