public function visitClassConst(Node $node) : Context
{
try {
$constant = (new ContextNode($this->code_base, $this->context, $node))->getClassConst();
// Mark that this class constant has been referenced
// from this context
$constant->addReference($this->context);
} catch (IssueException $exception) {
// We need to do this in order to check keys and (after the first 5) values in AST arrays, possibly other types.
Issue::maybeEmitInstance($this->code_base, $this->context, $exception->getIssueInstance());
} catch (\Exception $exception) {
// Swallow any other types of exceptions. We'll log the errors
// elsewhere.
}
// Check to make sure we're doing something with the
// class constant
$this->analyzeNoOp($node, Issue::NoopConstant);
return $this->context;
}