Skip to content

Array shapes in varType macro #234

@jakubvojacek

Description

@jakubvojacek

Version: v2.8.2

Bug Description

Array shapes (https://phpstan.org/writing-php-code/phpdoc-types#array-shapes) are not working as expected in the varType macro

Steps To Reproduce

{varType array{0: int, 1: int} $data}

yields error Unexpected content, expecting {varType type $var} in ...

Expected Behavior

I was hoping that this would be supported and that later on, PHPStan would be able to analyze it (not sure whether mesour's plugin will support it as well)

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