Closed SCIF closed 11 years ago
There should not be a @return static
in there, you only use that when the method returns new static();
Just put it here — http://youtrack.jetbrains.com/issue/WI-16587
In fact «self» is not supported by most populars IDEs :( Netbeans and Aptana just ignores that setting like it's absent. Just will wait some desicion from IDEA. My suggestion — http://youtrack.jetbrains.com/issue/WI-16587#comment=27-583159
I thought the correct formatting was @return $this ?
Nope, not according to the official PHPDOC docs. But most IDE's seem to use that.
Ohm. Very interesting — https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md#keyword
Seems like php semantic ($this, static, self) will become phpdoc standart soon.
I think static and self are already in the standard, but $this isn't.
I would recommend to use @return $this
, since most IDE's already support that, and the PHPDoc standard is in the making...
Updated the commit (wow! git push -f works for existence pr).
Now you can use chaining normally by ide's autocompletion. Some other small phpdoc sugar. Fixed some typos.