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

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

Gets the type and nullability of the parameter of a function.
private getParameter ( phpDocumentor\Reflection\Php\Project $project, integer $objectType, string $namespace = null, string $object = null, string $function, string $parameter ) : array
$project phpDocumentor\Reflection\Php\Project
$objectType integer
$namespace string
$object string
$function string
$parameter string
Результат array
    private function getParameter(Project $project, int $objectType, string $namespace = null, string $object = null, string $function, string $parameter) : array
    {
        $docBlock = $this->getDocBlock($project, $objectType, $namespace, $object, $function);
        if ($docBlock) {
            foreach ($docBlock->getTagsByName('param') as $tag) {
                if ($parameter !== sprintf('$%s', $tag->getVariableName())) {
                    continue;
                }
                return $this->getType($tag);
            }
        }
        return [];
    }