Пример #1
0
 protected function processLink($errorPos)
 {
     foreach ($this->commentParser->getLinks() as $link) {
         $content = @parse_url($link->getContent());
         if (!is_array($content) || !isset($content['scheme']) || !$content['scheme'] || !isset($content['host']) || !$content['host']) {
             $error = '@link tag must contain URL';
             $this->currentFile->addError($this->getReqPrefix($this->reqCodeEmpty) . $error, $errorPos);
         } elseif ($this->isInternalProject() && 'http://www.litecommerce.com/' != $link->getContent()) {
             $error = '@link tag must contain http://www.litecommerce.com/';
             $this->currentFile->addError($this->getReqPrefix($this->reqCodeEmpty) . $error, $errorPos);
         }
     }
 }