PDepend\Source\Language\PHP\AbstractPHPParser::parseReturnAnnotation PHP Метод

parseReturnAnnotation() приватный Метод

This method parses the given doc comment text for a return annotation and it returns the found return type.
private parseReturnAnnotation ( string $comment ) : string
$comment string A doc comment text.
Результат string
    private function parseReturnAnnotation($comment)
    {
        if (preg_match(self::REGEXP_RETURN_TYPE, $comment, $match) > 0) {
            foreach (explode('|', end($match)) as $type) {
                if (Type::isScalarType($type) === false) {
                    return $type;
                }
            }
        }
        return null;
    }
AbstractPHPParser