public function _lint()
{
$fp = explode('/', $this->node->file);
$pretty_file_name = $fp[count($fp) - 1];
$this->node->parent = $pretty_file_name;
$this->plines();
$tcnt = $this->node->token_count;
$et = $this->node->tokens;
$open = false;
$classes = 0;
$functions = 0;
$globals = array();
for ($i = 0; $i < $tcnt; $i++) {
switch ($et[$i][0]) {
case T_NAMESPACE:
$i = $this->pnamespace($i);
break;
case T_INLINE_HTML:
if ($open === true) {
$this->common_tokens($i);
}
break;
case T_CLOSE_TAG:
if ($this->pclosetag($i)) {
break 2;
}
break;
case T_OPEN_TAG:
if ($open === false) {
$this->popentag($i);
$open = true;
}
break;
case T_CLASS:
$classes++;
break;
case T_FUNCTION:
$functions++;
break;
case T_STRING:
if ($this->config->check(OPT_HARVEST_DOCS)) {
if ($et[$i][1] === 'define') {
$i = $this->pdefine($i);
}
}
$this->common_tokens($i);
break;
case T_VARIABLE:
$globals[] = $et[$i][1];
break;
default:
$this->common_tokens($i);
break;
}
}
$globals = array_unique($globals);
$compares = array('REF_BRANCHES' => $this->branches, 'CON_FILE_CLASSES' => $classes, 'REF_FILE_FUNCTIONS' => $functions, 'REF_FILE_GLOBALS' => count($globals));
foreach ($compares as $k => $_) {
if ($this->config->match_rule($k, $_)) {
$this->report($k, $_);
}
}
return $this->reports;
}