We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2335152 commit a13160dCopy full SHA for a13160d
src/Rules/Comparison/IfConstantConditionRule.php
@@ -53,7 +53,14 @@ public function processNode(
53
$addTip(RuleErrorBuilder::message(sprintf(
54
'If condition is always %s.',
55
$exprType->getValue() ? 'true' : 'false'
56
- )))->line($node->cond->getLine())->build(),
+ )))->line($node->cond->getLine())
57
+ ->identifier('deadCode.ifConstantCondition')
58
+ ->metadata([
59
+ 'depth' => $node->getAttribute('statementDepth'),
60
+ 'order' => $node->getAttribute('statementOrder'),
61
+ 'value' => $exprType->getValue(),
62
+ ])
63
+ ->build(),
64
];
65
}
66
0 commit comments