-
Notifications
You must be signed in to change notification settings - Fork 124
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
DocBlock\Tags\Method does not work nicely with an old php array syntax #271
Comments
Also all the logic for variadics and references would be nice on the |
This is problematic because Doctum needs to know if it is a variadic to display correctly |
Hi, Thanks for reporting this. I would like start with the fact that right now the I see the value of aligning the @ondrejmirtes, @muglug, @mvriel what do you think of this? I think psalm and phpstan would benefit from this as well, how-ever you are not using this library to process docblocks as far as I know. Maybe phpstan does via better-reflection? My opinion on this is that if you need more than a simple notation, a native method would fit the purpose better. Since documenting the parameters is also impossible using the //cc @ashnazg needs direction from PSR-19? |
Hi,
It doesn't, PHPStan uses its own https://github.com/phpstan/phpdoc-parser. And it already supports default parameter values in If you're proposing some specific new syntax to solve a problem, I'd need to see how it looks to form an opinion about it. |
Thanks @ondrejmirtes for your quick response. I don't want to introduce something new. Especially not when PHPStan already has support for the requested changes here. I think we have both way too much work to care about an edge case like this. In the years this library exists, nobody ever complained about the way If a full new notation of |
I started an effort to get this thing done #304 I'm not sure yet if I will keep it this way, nothing changed in the notation of |
Fixed in #343 |
Here is my solution: https://regex101.com/r/nySDm6/1
Test data:
static array[] ISO8859_1(array $d = [], string $s="", $f=array()) foo bar baz
The text was updated successfully, but these errors were encountered: