lint/dead-code/no-redundant-condition
In the lint-essential preset and every stricter one. In Rector’s rector/dead-code set. Safe fix.
What it does
Merge an if into the if before it when both check the same condition.
Configuration
[lint.rules]
"dead-code/no-redundant-condition" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
RemoveNextSameValueCondition(rector)