Skip to content

False positive on array item modification #8270

@MaksBrainiac

Description

@MaksBrainiac

Bug report

If one of the array item's properties (bool) is modified, PHPStan thinks all array items should change their type to static value (true/false), please check the example

Code snippet that reproduces the problem

https://phpstan.org/r/03ba5f2e-9ac1-4dce-bef8-e42d52461d5c

Expected output

No errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions