Skip to content

Improve "method static method" error wording #12557

@mvorisek

Description

@mvorisek

Feature request

repro: https://phpstan.org/r/f598eac3-f1c3-407a-a123-db3f53612e6e

I would expect:

-Unable to resolve the template type T in call to method static method Foo::assertStatic()
+Unable to resolve the template type T in call to static method Foo::assertStatic()

src: https://github.com/phpstan/phpstan-src/blob/2.1.4/src/Rules/Methods/CallMethodsRule.php#L69 and https://github.com/phpstan/phpstan-src/blob/2.1.4/src/Rules/Methods/CallStaticMethodsRule.php#L77 - all really all that messages affected?

This impl. seems https://github.com/phpstan/phpstan-src/blob/e140197a0ab83abf36af13760b75374485ae1e2a/src/Rules/Functions/CallUserFuncRule.php#L79 how it should be done.

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