PhpMigration\Changes\AbstractIntroduced::leaveNode PHP Метод

leaveNode() публичный Метод

public leaveNode ( $node )
    public function leaveNode($node)
    {
        // Function
        if ($this->isNewFunc($node)) {
            $this->addSpot('FATAL', true, sprintf('Cannot redeclare %s()', $node->migName));
            // Method
        } elseif ($this->isNewMethod($node, $method_name)) {
            $this->addSpot('WARNING', true, sprintf('Method %s::%s() will override built-in method %s()', $this->visitor->getClassName(), $node->migName, $method_name));
            // Class, Interface, Trait
        } elseif ($this->isNewClass($node)) {
            $this->addSpot('FATAL', true, sprintf('Cannot redeclare class "%s"', $node->migName));
            // Constant
        } elseif ($this->isNewConst($node)) {
            $constname = $node->args[0]->value->value;
            $this->addSpot('WARNING', true, sprintf('Constant "%s" already defined', $constname));
            // Parameter
        } elseif ($this->isNewParam($node)) {
            $advice = $this->paramTable->get($node->migName);
            $this->addSpot('NEW', false, sprintf('Function %s() has new parameter, %s', $node->migName, $advice));
        }
        // Conditional declaration clear
        if ($this->isConditionalFunc($node)) {
            $this->condFunc = null;
        } elseif ($this->isConditionalConst($node)) {
            $this->condConst = null;
        }
    }