phpstan / phpdoc-parser

Next-gen phpDoc parser with support for intersection types and generics
MIT License
1.31k stars 62 forks source link

Comment not allowed in @phpstan-type #219

Open dakur opened 10 months ago

dakur commented 10 months ago

Bug report

I'd like to add comment to local type alias (@phpstan-type) but it throws "PHPDoc tag @phpstan-type MyNumber has invalid value: Unexpected token "some", expected TOKEN_PHPDOC_EOL at offset..."

Didn't find any mention in docs that comments are not allowed.

Code snippet that reproduces the problem

https://phpstan.org/r/94564802-931b-496e-b84f-82795bd0b552

Expected output

No errors

Did PHPStan help you today? Did it make you happy in any way?

It helps every day, it's so native that I can think coding without it anymore.