phpactor icon indicating copy to clipboard operation
phpactor copied to clipboard

@param attributes on closures

Open BladeMF opened this issue 2 years ago • 4 comments

Is this supposed to be picked up by phpactor or am I doing it wrong? image

BladeMF avatar Mar 14 '23 18:03 BladeMF

No we don't currently support docblocks on anonymous functions (nor is it supported by PHPStan). I'm not sure if we have a good reason not to support it.

Note this wouldn't work anyway due to your other issue.

dantleech avatar Mar 14 '23 18:03 dantleech

existing feature request in PHPStan: https://github.com/phpstan/phpstan/issues/3770 - which would be a good place to start (as the docblock is a bit redundant if it works for Phpactor but fails on SA)

dantleech avatar Mar 14 '23 19:03 dantleech

Quite a thread they have there.

BladeMF avatar Mar 14 '23 19:03 BladeMF

Did this instead: image

BladeMF avatar Mar 14 '23 19:03 BladeMF