Skip to content

"Negated boolean expression is always true" should be reported regardless of the "Treat PHPDoc types as certain" setting #11903

@baci266

Description

@baci266

Bug report

When the "Treat PHPDoc types as certain" option is enabled in the PHPStan configuration, PHPStan correctly reports an error: "Negated boolean expression is always true" for the following code. However, this issue should also be reported even when the option is disabled, as it is not related to PHPDoc type certainty.

Code snippet that reproduces the problem

https://phpstan.org/r/032a6a99-9bb4-40d2-ae2b-7fa06212d128

Expected output

Negated boolean expression is always true

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

No response

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