protected function process_tokens()
{
$tcnt = $this->node->token_count;
$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);
}
break;
case T_VARIABLE:
if ($et[$i][1] == '$this') {
$this->parent_local($i);
} else {
$_locals[] = $et[$i][1];
}
break;
default:
$this->common_tokens($i);
break;
}
}
$locals = array_unique($_locals);
$compares = array('REF_ARGUMENTS' => count($args), 'REF_LOCALS' => count($locals), 'REF_BRANCHES' => $this->branches, 'REF_METHOD_LENGTH' => $this->node->length);
foreach ($compares as $k => $_) {
if ($this->config->match_rule($k, $_)) {
$this->report($k, $_);
}
}
if (!$this->node->abstract) {
$this->process_args($locals, $args);
}
$this->process_locals($locals, $_locals, $args);
}