-
Notifications
You must be signed in to change notification settings - Fork 5
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
PHP variadic function wrong variable name #135
Comments
Thanks for reporting, As the current generated comment match no recommendation, I have implemented your suggestion ("old" PhpStorm syntax)... But the syntax seems tools dependant (discussed here on StackOverflow ) PhpDoc documentation defines: /**
* @param mixed $args,... The arguments
*/ This option seem to be a better choice... |
Thanks 0.71.0 is now released on the evolution branch |
Works for me. Thanks. |
It looks like my static analyzer (phan) doesn't like this syntax. I have to check with the author. |
I check some most famous PHP static analysis tools.
All of them are using |
Thanks again, 0.71.1 is now released. On comment update the "...$args" notation will be applied |
LGTM. Thanks! |
Problem
Variadic function is introduced in PHP 5.6. Here's a simple example.
The generated PHPDoc looks like the following.
It looks like the
...
is treated as the variable type of$arg
but actually it is not and no type is declared here.Expected Result
Just a note. Here, the
<type>
is the type of the element of$args
rather than$args
itself.Reference: phpDocumentor/fig-standards#121 (comment)
Another Problem that May Be Related
Say, now I have my doc edited manually as the following.
Now I press Alt+Q(
doxy_comment_nearest_entity
). The doc becomesThe
...
is removed by plugin.The text was updated successfully, but these errors were encountered: