public function leaveNode(Node $node)
{
if (!$node instanceof Node\Expr\StaticCall) {
return;
}
$class = implode('\\', $node->class->parts);
$method = $node->name;
$normalized = sprintf('%s::%s', $class, $method);
if (!in_array($normalized, $this->blacklist)) {
return;
}
$this->addError(sprintf('Found blacklisted "%s" static method call', $normalized), $node->getline(), ParseError::TYPE_ERROR);
}