klesun / deep-assoc-completion

A phpstorm plugin for associative array key typing and completion
Other
267 stars 17 forks source link

Support `phpstan-param` phpdoc #177

Closed canvural closed 3 years ago

canvural commented 3 years ago

Looks like currently there is no support for the following phpdoc

/** @phpstan-param array{foo:int, bar:string} $foo*/
function foo(array $foo)
{
    // ...
}

while /** @param array{foo:int, bar:string} $foo*/ works.

Would be good to also treat @phpstan-param and @psalm-param same as @param

klesun commented 3 years ago

Hi. Thanks for the suggestion. @psalm-param should already work, but @phpstan-param support has to be added. Will do soon.

klesun commented 3 years ago

I take it should also include @phpstan-return and @phpstan-var:

https://phpstan.org/writing-php-code/phpdocs-basics

canvural commented 3 years ago

@psalm-param should already work

Ah, good! Yeah I only tested it with @phpstan-param And assumed @psalm-param is also missing.

Will do soon

Great! Thank you!

klesun commented 3 years ago

Released in 2021.03.11.001

image

(also added support for @phan-*)

canvural commented 3 years ago

Awesome! Thank you!