PhpMigration\CheckVisitor::enterNode PHP Method

enterNode() public method

public enterNode ( PhpParser\Node $node )
$node PhpParser\Node
    public function enterNode(Node $node)
    {
        $this->node = $node;
        // Record current
        if ($node instanceof Stmt\ClassLike) {
            /**
             * Class, Interface, Trait are stored in one same HashTable
             * (zend_executor_globals.class_table). Their name will be conflict
             * if duplicated (eg, class Demo {} and Interface Demo {}). So, we
             * treat all these class-like's name as Class name.
             */
            $this->class = $node;
            $this->classStack[] = $node;
        } elseif ($node instanceof FunctionLike) {
            $this->function = $node;
            $this->funcStack[] = $node;
        }
        foreach ($this->changes as $change) {
            $change->enterNode($node);
        }
        $this->node = null;
    }