protected function checkFileInternal(CheckContext $checkContext, Config $config)
{
$file = $checkContext->getFile();
$parser = new Parser(new Emulative());
try {
$parser->parse($file->getSource());
} catch (PhpParserError $e) {
$this->addViolation($file, $e->getStartLine(), 0, $e->getRawMessage(), Violation::SEVERITY_ERROR);
}
}