Skip to content

False positive with constant array of enum values #8957

@enumag

Description

@enumag

Bug report

I don't think there is a way to specify array value type for constants, is there?

Code snippet that reproduces the problem

https://phpstan.org/r/662b9978-5c55-4dfd-992f-30bec67a7f9c
EDIT: @var annotation doesn't work correctly:
https://phpstan.org/r/9b59f7b8-9e9b-4222-8d65-53ed0e8000da

Expected output

No error.

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