protected function populateCall($node, $type)
{
if (ParserHelper::isDynamicCall($node)) {
return;
}
$posbit = $this->positionByValue($node);
if (!$posbit) {
return;
}
if ($type == 'func') {
$callname = $node->name;
} elseif ($type == 'static') {
$class = $node->class->toString();
if ($class == 'self' && $this->visitor->inClass()) {
$class = $this->visitor->getClassName();
}
$callname = $class . '::' . $node->name;
} elseif ($type == 'method') {
if ($node->var instanceof Expr\Variable && $node->var->name == 'this' && $this->visitor->inClass()) {
$oname = $this->visitor->getClassName();
} else {
$oname = '';
}
$callname = $oname . '->' . $node->name;
}
$this->callList[] = ['name' => $callname, 'pos' => $posbit, 'file' => $this->visitor->getFile(), 'line' => $node->getLine()];
}