Example #1
0
 /**
  * Returns full description from the docblock.
  *
  * @param \Reflector $reflection
  * @return string
  */
 protected function parseDocCommentDetail($reflection)
 {
     $comment = strtr(trim(preg_replace('/^\\s*\\**( |\\t)?/m', '', trim($reflection->getDocComment(), '/'))), "\r", '');
     if (preg_match('/^\\s*@\\w+/m', $comment, $matches, PREG_OFFSET_CAPTURE)) {
         $comment = trim(substr($comment, 0, $matches[0][1]));
     }
     if ($comment !== '') {
         return rtrim(Console::renderColoredString(Console::markdownToAnsi($comment)));
     }
     return '';
 }