public function addSpot($cate, $identified, $message, $version = '', $line = null, $file = null)
{
if (is_null($line) && $this->node instanceof Node) {
$line = $this->node->getLine();
}
if (is_null($file)) {
$file = $this->getFile();
}
if ($file instanceof \SplFileInfo) {
$filename = $file->getRealpath();
} else {
$filename = '';
}
// Add by file
$this->spots[$filename][] = ['cate' => $cate, 'identified' => $identified, 'message' => $message, 'version' => $version, 'line' => $line, 'file' => $file];
}