public function _lint()
{
$tcnt = count($this->node->tokens);
$et = $this->node->tokens;
$args = false;
$_locals = array();
for ($i = 0; $i < $tcnt; $i++) {
switch ($et[$i][0]) {
case T_PARENTHESIS_OPEN:
if ($args === false) {
$args = $this->parse_args($i);
if ($this->config->match_rule('REF_ARGUMENTS', count($args))) {
$this->report('REF_ARGUMENTS', count($args));
}
}
break;
case T_VARIABLE:
$_locals[] = $et[$i][1];
break;
case T_USE:
$i = $this->find($i, T_PARENTHESIS_OPEN);
$_args = $this->parse_args($i);
$this->add_parent_data($_args, T_VARIABLE);
if ($this->config->match_rule('REF_USE_ARGUMENTS', count($_args))) {
$this->report('REF_USE_ARGUMENTS', count($_args));
}
$args = array_merge($args, $_args);
break;
default:
$this->common_tokens($i);
break;
}
}
$locals = array_unique($_locals);
$compares = array('REF_LOCALS' => count($locals), 'REF_BRANCHES' => $this->branches, 'REF_FUNCTION_LENGTH' => $this->node->length);
foreach ($compares as $k => $_) {
if ($this->config->match_rule($k, $_)) {
$this->report($k, $_);
}
}
$this->process_args($locals, $args);
$this->process_locals($locals, $_locals, $args);
return $this->reports;
}