public function visitToken(File $file)
{
$token = $token->current();
if ($token->getType() === T_OPEN_TAG) {
$tag = trim($token->getLexeme());
$name = self::$tagMap[$tag];
if (!in_array($name, $this->allowed)) {
$this->addViolation($file, $token->getLine(), $token->getColumn(), sprintf('PHP tag "%s" is not allowed', $tag));
}
} elseif ($this->disallowClosingTag) {
$this->addViolation($file, $token->getLine(), $token->getColumn(), 'Closing PHP tag found');
}
}