Skip to content

if.condNotBoolean is not generated if variable is an item from an untyped array #289

Description

@stefanfisk

Bug report

Values taken from untyped arrays no longer generate if.condNotBoolean since v2.1.30.

Code snippet that reproduces the problem

https://phpstan.org/r/93a0d683-e507-4a8b-bb00-dfb88285b9f2

Expected output

I'd expect the snipped to generate if.condNotBoolean. Here is the equivalent snippet with the array type defined https://phpstan.org/r/12ec5066-dc65-4576-b588-6d642e0c45ee.

Did PHPStan help you today? Did it make you happy in any way?

It helped my refactor a bunch of weird legacy code without having to tear my hair out!

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