Skip to content

Imploding the keys of a filtered array is considered true #6715

@netpok

Description

@netpok

Bug report

I have a method where the keys of a filtered array is imploded while this can be an empty string phpstan always considers it true.

Code snippet that reproduces the problem

https://phpstan.org/r/9c71b566-6dd5-4c44-b0e2-36ba7db46b42

Expected output

The first two chunk of code to produce errors, the last two to pass.

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