Skip to content

Commit

Permalink
[NodeTypeResolver] Clean up wrap in parentheses check ReprintNodeVisitor
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jan 22, 2025
1 parent 00ae805 commit bca40d7
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use PhpParser\Node;
use PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp\Coalesce;
use PhpParser\Node\Expr\BooleanNot;
use PhpParser\NodeVisitorAbstract;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\NodeTypeResolver\PHPStan\Scope\Contract\NodeVisitor\ScopeResolverNodeVisitorInterface;
Expand Down Expand Up @@ -36,12 +35,6 @@ public function enterNode(Node $node): ?Node
return $node;
}

if ($node instanceof BooleanNot && $node->expr instanceof BinaryOp && $node->expr->getAttribute(
AttributeKey::ORIGINAL_NODE
) instanceof Node) {
$node->expr->setAttribute(AttributeKey::WRAPPED_IN_PARENTHESES, true);
}

return null;
}
}

0 comments on commit bca40d7

Please sign in to comment.