/**
* checkFileInternal(): defined by AbstractCheck.
*
* @see AbstractCheck::checkFileInternal()
*
* @param CheckContext $checkContext
* @param Config $config
*/
protected function checkFileInternal(CheckContext $checkContext, Config $config)
{
$file = $checkContext->getFile();
$tokens = $checkContext->getTokenList();
$firstToken = $tokens->rewind()->current();
if (!$firstToken->isType(T_OPEN_TAG)) {
$this->addViolation($file, 1, 1, 'Files must begin with the PHP open tag.');
}
}