Skip to content

Comment not allowed in @phpstan-type #219

Open
@dakur

Description

@dakur

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions