type_provider = $old_type_provider; } /** * @return Node\Expr */ public function enterNode(Node $node): Node { /** @var Expr $node */ $origNode = $node; $node = clone $node; $node_type = $this->type_provider->getType($origNode); if ($node_type) { $this->type_provider->setType($node, $node_type); } return $node; } }