public getTypeHint ( ) : phpDocumentor\Reflection\Type | ||
return | phpDocumentor\Reflection\Type |
public function getTypeHint()
{
$namespaceForType = $this->function instanceof ReflectionMethod ? $this->function->getDeclaringClass()->getNamespaceName() : $this->function->getNamespaceName();
return (new FindTypeFromAst())->__invoke($this->node->type, $this->function->getLocatedSource(), $namespaceForType);
}
/** * @return string */ public function getHints() { $hints = $this->reflectionParameter->getDocBlockTypeStrings(); $hints[] = $this->reflectionParameter->getTypeHint(); $hints = array_filter($hints, 'strlen'); return implode('|', $hints); }