Google\Cloud\Dev\DocGenerator\Parser\CodeParser::handleTypes PHP Méthode

handleTypes() private méthode

private handleTypes ( $types )
    private function handleTypes($types)
    {
        foreach ($types as &$type) {
            // object is a PHPDoc keyword so it is not capable of detecting the context
            // https://github.com/phpDocumentor/ReflectionDocBlock/blob/2.0.4/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php#L37
            if ($type === 'Object') {
                $type = '\\Google\\Cloud\\Storage\\Object';
            }
            if (substr_compare($type, '\\Google\\Cloud', 0, 13) === 0) {
                $type = $this->buildLink($type);
            }
            $matches = [];
            if (preg_match('/\\\\?Generator\\<(.*?)\\>/', $type, $matches)) {
                $typeLink = $matches[1];
                if (strpos($matches[1], '\\') !== FALSE) {
                    $typeLink = $this->buildLink($matches[1]);
                }
                $type = sprintf(htmlentities('Generator<%s>'), $typeLink);
            }
        }
        return $types;
    }