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;
}