Skip to content

False positive with min/max #3752

@enumag

Description

@enumag

Bug report

This seems to be a regression. It worked fine with PHPStan 0.12.36 but reports a false positive on 0.12.38.

In the code the array returned by array_filter can never be empty so min can't return false.

Code snippet that reproduces the problem

https://phpstan.org/r/1bc7229e-8e0d-4132-9112-b2c90c09bc92

Expected output

no error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions