protected function process_tokens()
{
$tcnt = count($this->node->tokens);
$et = $this->node->tokens;
$args = false;
$_locals = array();
$branches = 0;
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:
$_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_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);
}