Skip to content

Commit 83a4a12

Browse files
authored
[CodeQuality] Skip with HTML on TernaryFalseExpressionToIfRector (#7954)
1 parent 9dccc8a commit 83a4a12

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
# its a .phtml file
3+
?>
4+
<td<?php $this->call($a, 'v') ? ' class="x"' : '' ?>>

rules/CodeQuality/Rector/Expression/TernaryFalseExpressionToIfRector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use PhpParser\Node\Expr\Variable;
1111
use PhpParser\Node\Stmt\Expression;
1212
use PhpParser\Node\Stmt\If_;
13+
use Rector\Contract\Rector\HTMLAverseRectorInterface;
1314
use Rector\NodeAnalyzer\ExprAnalyzer;
1415
use Rector\Rector\AbstractRector;
1516
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
@@ -18,7 +19,7 @@
1819
/**
1920
* @see \Rector\Tests\CodeQuality\Rector\Expression\TernaryFalseExpressionToIfRector\TernaryFalseExpressionToIfRectorTest
2021
*/
21-
final class TernaryFalseExpressionToIfRector extends AbstractRector
22+
final class TernaryFalseExpressionToIfRector extends AbstractRector implements HTMLAverseRectorInterface
2223
{
2324
public function __construct(
2425
private readonly ExprAnalyzer $exprAnalyzer

0 commit comments

Comments
 (0)