PHPDoc collection/generics notation supported?
Just wondering if denoting collections like Collection<int> is supported by PHPStorm. See the collections section: https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md#abnf
I see issues filed that suggests that it is, but my PHPStorm 2017 doesn't seem to recognise it.
请先登录再写评论。
Hi there,
AFAIK -- nope.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000121970/comments/115000160010
Right now you may try something like this
Not the same for sure, but at least something
Yes, that's what I have been doing.
Hopefully it passes and it's supported.
The main major disadvantage right now is that even with Andriy's "hack", one still cannot properly document the fact that an array will have keys of a certain type - eg; there's no way to properly declared `array<string, int>` (useful, eg; if you're passing data with the key being emails, names or so).
By PHP's standards, right now one can see that `array` type is synonymous with `array<mixed, mixed>`... which makes this issue even more critical for simple arrays.