-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Squiz.Commenting.FunctionComment.MissingReturn @inheritDoc not resolved? #2770
Comments
Tested with |
Never mind, you learn something new every day. |
Not sure why this was closed. There's currently no open issue regarding inheritdoc Seems like like if the sniff had a
/**
* {@inheritdoc}
*/ |
I closed this issue after reading the PHP doc documentation, CS works according to the specification as it currently is. @inheritdoc is only for the title and description. |
https://docs.phpdoc.org/latest/guides/inheritance.html
8 years have passed... That may be the "official" specification, but the community has adopted it to include the the entire parent comment if the comment consists only of @inheritdoc a non-exhaustive list of IDEs / frameworks / projects that use it for this purpose
|
Can this be reopened and supported? Basically any documentation builder (including phpDocumentor), framework and modern IDE supports It would be nice if PHPCS could actually detect if all parent's parameters are correct or not and also reflect than on children, but option to just ignore detection of missing/incomplite tags (but not other docblock detections) if Also, maybe a bit newer standard is PSR-19 draft which specified:
|
A |
Reopened the issue for clarification from devs. |
#3051 solves this for me locally. Example usage for testing:
|
This has now been resolved by the sniff property added in #3051, and documented here: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties#squizcommentingfunctioncomment |
Not working for me. Even with |
It should not be raised in this case, because the methods who are "missing" docs are declared with `@inheritDoc`. See squizlabs/PHP_CodeSniffer#2770 (comment)
This new option is unreleased and not available in 3.5.8. This will become available when 3.6.0 is released. |
Oh! I just assumed there'd be a releaase since mid-january this year. What about making a beta release with this? :) |
It's supported to use {@inheritdoc}. Add a support of @inheritdoc (w/ brackets). Original PR number - squizlabs#3051 Closes squizlabs#2770
It's supported to use {@inheritdoc}. Add support of @inheritdoc (w/o brackets). Original PR number - squizlabs#3051 Closes squizlabs#2770
Hi,
I have
@inheritDoc
as the docblock to one of my inherited methods. The parent method is documented correctly, however, Squiz.Commenting does not appear to inherit the doc-block.The text was updated successfully, but these errors were encountered: