Skip to content

auto-fix "Only booleans are allowed in a ternary operator condition" #317

@staabm

Description

@staabm

Feature request

I think we can auto-fix

Only booleans are allowed in a ternary operator condition, PHPStan\Reflection\ClassReflection|null given.

in case of simple conditions which only can contain a single falsy-value

https://phpstan.org/r/488fe4b8-a3fe-4f53-996f-0692a8c5b9d8

similar to #316

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

No response

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