Phan\AST\UnionTypeVisitor::visitClassConst PHP Method

visitClassConst() public method

Visit a node with kind \ast\AST_CLASS_CONST
public visitClassConst ( ast\Node $node ) : UnionType
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
return Phan\Language\UnionType The set of types that are possibly produced by the given node
    public function visitClassConst(Node $node) : UnionType
    {
        $constant_name = $node->children['const'];
        try {
            $constant = (new ContextNode($this->code_base, $this->context, $node))->getClassConst();
            return $constant->getUnionType();
        } catch (NodeException $exception) {
            $this->emitIssue(Issue::Unanalyzable, $node->lineno ?? 0);
        }
        return new UnionType();
    }