Skip to content

False positive when array is filled via side-effect function #1882

@keichinger

Description

@keichinger

Summary of a problem or a feature request

PhpStan incorrectly reports that the $this->log is empty, even though it'll be filled in a different function and definitely has elements.

Code snippet that reproduces the problem

https://phpstan.org/r/92af8d9f-9f81-4078-97dd-9f0ed4c675a2

Expected output

No error

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions