Skip to content

@return static in trait methods triggers MoreSpecificReturnType #5264

@lukasbestle

Description

@lukasbestle

If a trait method uses parent::theSameMethod() to call a method on the parent class of the class where the trait is used, Psalm triggers MoreSpecificReturnType even though static should never be too specific.

https://psalm.dev/r/7c7aa6c85e

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