public function visitToken(File $file)
{
if (!$file->seekTokenType(T_STRING, false, '(')) {
return;
}
$token = $file->current();
if (!in_array($token->getLexeme(), self::$magicMethods) && !preg_match('(^' . $this->format . '$)', $token->getLexeme())) {
$this->addViolation($file, $token->getLine(), $token->getColumn(), sprintf('Method name does not match format "%s"', $this->format));
}
}