Google\Cloud\Dev\DocGenerator\Parser\CodeParser::buildDescription PHP Method

buildDescription() private method

private buildDescription ( $docBlock, $content = null )
    private function buildDescription($docBlock, $content = null)
    {
        if ($content === null) {
            $content = $docBlock->getText();
        }
        $desc = new Description($content, $docBlock);
        $parsedContents = $desc->getParsedContents();
        if (count($parsedContents) > 1) {
            // convert inline {@see} tag to custom type link
            foreach ($parsedContents as &$part) {
                if ($part instanceof Seetag) {
                    $reference = $part->getReference();
                    if (substr_compare($reference, 'Google\\Cloud', 0, 12) === 0) {
                        $part = $this->buildLink($reference);
                    }
                }
            }
            $content = implode('', $parsedContents);
        }
        $content = str_ireplace('[optional]', '', $content);
        return $this->markdown->parse($content);
    }