Phan\Analysis\PostOrderAnalysisVisitor::visitStatic PHP Метод

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

public visitStatic ( ast\Node $node ) : Context
$node ast\Node A node to parse
Результат Phan\Language\Context A new or an unchanged context resulting from parsing the node
    public function visitStatic(Node $node) : Context
    {
        $variable = Variable::fromNodeInContext($node->children['var'], $this->context, $this->code_base, false);
        // If the element has a default, set its type
        // on the variable
        if (isset($node->children['default'])) {
            $default_type = UnionType::fromNode($this->context, $this->code_base, $node->children['default']);
            $variable->setUnionType($default_type);
        }
        // Note that we're not creating a new scope, just
        // adding variables to the existing scope
        $this->context->addScopeVariable($variable);
        return $this->context;
    }