analyse/operators/non-boolean-and-operand
In the analyse-strict preset and every stricter one. Report only. Upstream gates: strictRules.booleansInConditions.
Configuration
[analyse.rules]
"operators/non-boolean-and-operand" = "on"
To skip it in some files or lines, add an ignore comment.
Replaces
BooleanInBooleanAndRule(phpstan-classes)booleanAnd.leftNotBoolean(phpstan-strict-rules)booleanAnd.rightNotBoolean(phpstan-strict-rules)booleanOr.leftNotBoolean(phpstan-strict-rules)booleanOr.rightNotBoolean(phpstan-strict-rules)logicalAnd.leftNotBoolean(phpstan-strict-rules)logicalAnd.rightNotBoolean(phpstan-strict-rules)logicalOr.leftNotBoolean(phpstan-strict-rules)logicalOr.rightNotBoolean(phpstan-strict-rules)