protected function processSee($errorPos) { foreach ($this->commentParser->getSees() as $see) { $content = @parse_url($see->getContent()); $isURL = is_array($content) && isset($content['scheme']) && $content['scheme'] && isset($content['host']) && $content['host']; if (!$isURL && !preg_match('/^____\\w+_see____$/Ss', $see->getContent())) { $error = '@see tag must contain URL or special placeholder'; $this->currentFile->addError($this->getReqPrefix($this->reqCodeEmpty) . $error, $errorPos); } } }
/** * Process the see tags. * * @param int $commentStart The position in the stack where the comment started. * * @return void */ protected function processSees($commentStart) { $sees = $this->commentParser->getSees(); if (empty($sees) === false) { foreach ($sees as $see) { $errorPos = $commentStart + $see->getLine(); $content = $see->getContent(); if (empty($content) === true) { $error = 'Content missing for @see tag in variable comment'; $this->currentFile->addError($error, $errorPos, 'EmptySees'); continue; } $spacing = substr_count($see->getWhitespaceBeforeContent(), ' '); if ($spacing !== 1) { $error = '@see tag indented incorrectly; expected 1 spaces but found %s'; $data = array($spacing); $this->currentFile->addError($error, $errorPos, 'SeesIndent', $data); } } } }
/** * Process the see tags. * * @param int $commentStart The position in the stack where the comment started. * * @return void */ protected function processSees($commentStart) { $sees = $this->commentParser->getSees(); if (empty($sees) === false) { foreach ($sees as $see) { $errorPos = $commentStart + $see->getLine(); $content = $see->getContent(); if (empty($content) === true) { $error = 'Content missing for @see tag in variable comment'; $this->currentFile->addError($error, $errorPos); continue; } $spacing = substr_count($see->getWhitespaceBeforeContent(), ' '); if ($spacing !== 3) { $error = '@see tag indented incorrectly. '; $error .= "Expected 3 spaces but found {$spacing}."; $this->currentFile->addError($error, $errorPos); } } } }