Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

fix HeadLink docblock method declaration hints #6038

Merged

Conversation

stefanotorresi
Copy link
Contributor

IDEs were complaining about missing arguments which are actually optional.

@Maks3w
Copy link
Member

Maks3w commented Mar 25, 2014

Is this compatible with PHPDoc definition?

@stefanotorresi
Copy link
Contributor Author

To be honest I don't know, I gave a look at PHPDoc reference but couldn't find anything about default arguments in @method. You can specify argument types tho, so I guess it should work.

@Ocramius
Copy link
Member

Ocramius commented Apr 2, 2014

@mvriel do you know if @method foo bar($baz = 'tab') works?

@mvriel
Copy link
Contributor

mvriel commented Apr 3, 2014

@Ocramius currently the syntax for the @method tag does not explicitly allow for default values (http://www.phpdoc.org/docs/latest/references/phpdoc/tags/method.html).

I can however see how this would be beneficial and would warrant a change in the PHPDoc definition; can you or @stefanotorresi open an issue in the phpDocumentor/phpDocumentor2 repository to allow default values on @method tags?

@Ocramius
Copy link
Member

Ocramius commented Apr 3, 2014

@mvriel thanks for looking into it! I was looking in the code but couldn't find any hints, so I will indeed open an issue.

@weierophinney
Copy link
Member

Will wait to merge until phpDocumentor/phpDocumentor#1194 is closed.

@Ocramius
Copy link
Member

Will be included in PhpDocumentor 2.6. Merging here.

@Ocramius Ocramius self-assigned this May 20, 2014
@Ocramius Ocramius added this to the 2.3.2 milestone May 20, 2014
@Ocramius Ocramius merged commit 0f9df78 into zendframework:master May 20, 2014
Ocramius added a commit that referenced this pull request May 20, 2014
@stefanotorresi stefanotorresi deleted the fix/headlink-docblock-hintning branch June 24, 2014 10:00
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
…ptional-params-hinting'

Type-hints as of phpDocumentor/phpDocumentor2zendframework/zf2#1194

Close zendframework/zendframework#6038
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
…ptional-params-hinting' into develop

Optional type hints as of phpDocumentor/phpDocumentor2zendframework/zf2#1194

Close zendframework/zendframework#6038
Forward Port zendframework/zendframework#6038
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants