Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
celorodovalho opened this issue Jun 12, 2019 · 3 comments
Closed

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

celorodovalho opened this issue Jun 12, 2019 · 3 comments
Labels
enhancement Improvements to existing rules

Comments

@celorodovalho
Copy link

celorodovalho commented Jun 12, 2019

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?

@celorodovalho celorodovalho added the enhancement Improvements to existing rules label Jun 12, 2019
@orlangur
Copy link

Thanks @lenaorobei. Inheritdoc is currently under process of complete removal in Vinai devdocs PR.

@lenaorobei
Copy link
Contributor

@celorodovalho please refer this PR for more details magento/devdocs#4425

@lenaorobei
Copy link
Contributor

@celorodovalho mentioned PR is merged DevDocs are reflecting Magento recommendation.
https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html

We also have an issue to implement corresponding rule and replace with the existing one #54

If you feel like DevDocs contain wrong information please do not hesitate to open magento/devdocs issue.

magento-devops-reposync-svc pushed a commit that referenced this issue Nov 5, 2021
AC-1509: Remove outdated JSCS static tests from magento
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing rules
Projects
None yet
Development

No branches or pull requests

3 participants