Dunglas\PhpDocToTypeHint\Converter::getReturn PHP Метод

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

Gets the return type of a function.
private getReturn ( phpDocumentor\Reflection\Php\Project $project, integer $objectType, string $namespace = null, string $object = null, string $function ) : array
$project phpDocumentor\Reflection\Php\Project
$objectType integer
$namespace string
$object string
$function string
Результат array
    private function getReturn(Project $project, int $objectType, string $namespace = null, string $object = null, string $function) : array
    {
        $docBlock = $this->getDocBlock($project, $objectType, $namespace, $object, $function);
        if ($docBlock) {
            $tags = $docBlock->getTagsByName('return');
            if (1 !== count($tags)) {
                return [];
            }
            return $this->getType($tags[0]);
        }
        return [];
    }