Skip to content

Combining @var and @phpstan-var breaks $this in tempaltes #4606

@b1rdex

Description

@b1rdex

Bug report

PhpStorm doesn't support array{} notation, so I tried to add a more specific one using @phpstan-var tag. It works, but it somehow broke $this. Removing @phpstan-var list<array{stdClass, int}> $assigned line or using @var list<array{stdClass, int}> $assigned fixes the issue.

Code snippet that reproduces the problem

https://phpstan.org/r/44439bbd-02ce-40b5-9ad1-2d40b521a7a7

Expected output

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