private function parseDocComment($loc): string
    {
        $tokens = $this->getTokenStream();

        // Look back from T_PUBLIC, T_PROTECTED, T_PRIVATE or T_CLASS
        // for the T_DOC_COMMENT token
        $loc = $tokens->previous($loc, [T_WHITESPACE, T_STATIC, T_FINAL]);

        // Check for doc comment
        if ($loc && $tokens->type($loc) === T_DOC_COMMENT) {
            $doc_comment = $tokens->value($loc);
            // strip off indentation
            $doc_comment = preg_replace('/^[ \t]*\*/m', ' *', $doc_comment);

            return $doc_comment;
        }

        return '';
    }