Skip to content

{@inheritdoc} annotation overrides any annotation of the extended method #3230

@ste93cry

Description

@ste93cry

Bug report

When using {@inheritdoc} to inherit the description of a parent method, PHPStan ignores the annotations on the overridden method. In the example below the base class should be part of a 3rd party vendor, so its error can be safely ignored for this bug report.

Code snippet that reproduces the problem

https://phpstan.org/r/58230a9a-211c-4260-bd87-387c3bd058eb

Expected output

I expect no errors to be thrown for the Bar::test() method

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions