/**
  * Process the version tag.
  *
  * @param int $errorPos The line number where the error occurs.
  *
  * @return void
  */
 protected function processVersion($errorPos)
 {
     /** @var PHP_CodeSniffer_CommentParser_SingleElement $version  */
     $version = $this->commentParser->getVersion();
     if (!is_null($version)) {
         $content = $version->getContent();
         $matches = array();
         if (empty($content)) {
             $error = 'Content missing for @version tag in file comment';
             $this->currentFile->addError($error, $errorPos, 'EmptyVersion');
         } elseif (!preg_match('~(SVN|CVS|Id):~', $content)) {
             $error = 'Invalid version "%s" in file comment; consider "CVS: <cvs_id>" or "SVN: <svn_id>" instead';
             $data = array($content);
             $this->currentFile->addWarning($error, $errorPos, 'InvalidVersion', $data);
         }
     }
 }