Skip to content

Support {@inheritdoc} #50

@piotr-cz

Description

@piotr-cz

Let's consider allowing the {@inheritdoc} tag.

This really helps when extending classes, you don't have to rewrite whole docblock and keep it up to date with docblock changes in base class.

Important bonus is that one can easily see that the property has a parent.

At this moment php code sniffer complains like:

50 | ERROR | Doc comment for "$form" missing
52 | ERROR | Missing @return tag in function comment

This tag is being widely used in projects like Symfony and Drupal.

Usage

class A
{
    /**
     * Foo method
     *
     * @param   array  $bar  Bar
     *
     * @return  void
     */
    public function foo(array $bar)
    {
    }
}

class B extends A
{
    /**
     * {@inheritDoc}
     */
    public function foo(array $bar)
    {
    }
}

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions