|
18 | 18 | use PhpParser\Node\Expr\BinaryOp\Pipe; |
19 | 19 | use PhpParser\Node\Expr\CallLike; |
20 | 20 | use PhpParser\Node\Expr\Instanceof_; |
21 | | -use PhpParser\Node\Expr\Match_; |
22 | 21 | use PhpParser\Node\Expr\MethodCall; |
23 | 22 | use PhpParser\Node\Expr\Ternary; |
24 | 23 | use PhpParser\Node\Expr\Yield_; |
|
30 | 29 | use PhpParser\Node\Stmt\Nop; |
31 | 30 | use PhpParser\PrettyPrinter\Standard; |
32 | 31 | use PhpParser\Token; |
33 | | -use PHPStan\Node\Expr\AlwaysRememberedExpr; |
34 | 32 | use Rector\Configuration\Option; |
35 | 33 | use Rector\Configuration\Parameter\SimpleParameterProvider; |
36 | 34 | use Rector\NodeAnalyzer\ExprAnalyzer; |
@@ -127,23 +125,6 @@ protected function p( |
127 | 125 | int $lhsPrecedence = self::MAX_PRECEDENCE, |
128 | 126 | bool $parentFormatPreserved = false |
129 | 127 | ): string { |
130 | | - // handle already AlwaysRememberedExpr |
131 | | - // @see https://github.com/rectorphp/rector/issues/8815#issuecomment-2503453191 |
132 | | - if ($node instanceof AlwaysRememberedExpr) { |
133 | | - return $this->p($node->getExpr(), $precedence, $lhsPrecedence, $parentFormatPreserved); |
134 | | - } |
135 | | - |
136 | | - // handle overlapped origNode is Match_ and its subnodes still have AlwaysRememberedExpr |
137 | | - $originalNode = $node->getAttribute(AttributeKey::ORIGINAL_NODE); |
138 | | - if ($originalNode instanceof Match_) { |
139 | | - $subNodeNames = $node->getSubNodeNames(); |
140 | | - foreach ($subNodeNames as $subNodeName) { |
141 | | - while ($originalNode->{$subNodeName} instanceof AlwaysRememberedExpr) { |
142 | | - $originalNode->{$subNodeName} = $originalNode->{$subNodeName}->getExpr(); |
143 | | - } |
144 | | - } |
145 | | - } |
146 | | - |
147 | 128 | $this->wrapBinaryOpWithBrackets($node); |
148 | 129 |
|
149 | 130 | $content = parent::p($node, $precedence, $lhsPrecedence, $parentFormatPreserved); |
|
0 commit comments