Skip to content

Single line @inheritdoc shouldn't be allowed? #113

Closed
@celorodovalho

Description

@celorodovalho

Description

Accord with https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#2-conventions-used-in-this-document, we can use single line annotations for @inheritdoc DocBlocks. But, there is no mention about "single line / inline @inheritdoc" in Magento Guidelines (https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc), and if run the phpcs from Magento, I got a exception about:

You must use "*/" to end a function comment; found "/** @inheritdoc */"

Expected behavior

Allowance to use single line / inline DocBlocks to @inheritdoc

Benefits

Conformity with php-fig default standards

Additional information

If I use:

    /**
     * @inheritdoc
     */

Like described in documentation () I still get a error:

The incorrect inherit doc tag usage. Should be {@inheritdoc}

Why? If I want to inherit the entire doc block from the parent method?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovements to existing rules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions