Skip to content

False positives when using method_exists() with a static method #1267

@josephzidell

Description

@josephzidell

Summary of a problem or a feature request

When using method_exists() with a static method, it is giving a false positive error. The PHP documentation clearly highlights this as a valid use-case.

Code snippet that reproduces the problem

https://phpstan.org/r/ddb2e9099834cf325a7917bcd50b42e2

Actual output

Call to an undefined static method Greetings::waveGoodbye().

Expected output

Nothing. Should have no errors

Similar to #323

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions