-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
@inheritdoc should be {@inheritdoc} #11635
Comments
i think the use case there is distinct. /**
* @inheritdoc
*/
public function method(); will copy the long description, and other tags like params, return, etc. /**
* {@inheritdoc}
* @return string
*/
public function method(); Will copy ONLY the long description, not the rest of the tags which have to be asigned again. |
The problem with this is, that there is no real spec of PHPDoc (yet) and at the time when the yii2-apidoc tool has been implemented the page you linked also contained an |
IDEs are OK with what's used currently. |
Для всех методов где есть тег |
@mkiselev no, APIdoc tool must be adjusted, see #11635 (comment) |
@cebe yep, I was read this PSR. |
As long as there is no spec to follow I do not think there is anything we can do about this issue. |
@cebe "all tags" are inherited by default, so But the main problem with |
I tend to agree with @rob006.
blocks should be removed at all as they simply don't make any sense. Only inline |
What exactly is not working with current Yii PHPdoc? |
How does usage of |
@klimov-paul |
I'll just drop the link to phpDocumentor 2 mentioning the |
TBH, this issue mostly describes problems with a documentation parsing in IDEs. In a long term, I think it's easier for PhpStorm to support |
we're going to make a standard and then follow it ;) https://twitter.com/cebe_cc/status/884929923294650368 |
Personally I don't see any sense in existing of |
What we've noticed, is phpDocumentor generates errors with |
Summary of current IDE supportBlock-level
|
That basically means that there's no sense to switch to |
So we consider @rob006's screenshots to be forged in Photoshop or something? Looks like there are 2 researches here with quite an opposite results, so it is hard to determine, who speaks the truth. |
PHPDocumentor project uses This project is the closest thing to be a standard about PHPDoc at the present state. |
Hmm... let me reinstall NetBeans and try again. I've tried by mouse + CTRL over class name (works) and same over method name (displays |
@samdark |
@samdark, you are mixing different things here. PHPDoc has a specific demand on formatting: description plain text goes first, then tags In your example you attempt to forge method PHPDoc to be following: /**
* This is
* Parent description
* @param int $var
* @return int
* string
*/ which is obviously incorrect. |
The question here is whether IDE picks up parent description from E.g. which has better support: this? /**
* @inheritdoc
*/
public function foo() {..}
/**
* @inheritdoc
* @return Override
*/
public function foo() {..}
/**
* @inheritdoc
* @param Override $var
*/
public function foo($var) {..} or this? /**
* {@inheritdoc}
*/
public function foo() {..}
/**
* {@inheritdoc}
* @return Override
*/
public function foo() {..}
/**
* {@inheritdoc}
* @param Override $var
*/
public function foo($var) {..} |
OK. Netbeans supports plain @rob006, @klimov-paul my example makes sense according to phpdocumenor docs:
But indeed, that doesn't matter. |
So I'm all for |
OK, since |
Does /**
* This is the short description.
*
* This is the long description...
*/ |
Both. |
here is an example, where at the position of Line 695 in 2484154
|
@cebe There is no real standard for this, so every IDE/tool behaves differently. AFAIK, according to phpDocumentor docs, summary and description inherits separately, so in this BTW: I've made some research some time ago. Not sure if it is still valid, but prepare for brainfuck: https://netbeans.org/bugzilla/show_bug.cgi?id=269107#c8 :D |
Resolved by commit 65f6b59 |
According to the documentation of phpdoc, the
@inheritdoc
tag to indicate that the function documentation should be copied from the parent function should be written as{@inheritdoc}
.Currently,
@inheritdoc
is used everywhere in the code of Yii2.The next version of Netbeans should be able to process these according to this page.
The text was updated successfully, but these errors were encountered: