PhpParser\Builder\Param::setTypeHint PHP Метод

setTypeHint() публичный Метод

Sets type hint for the parameter.
public setTypeHint ( string | Name | NullableType $type )
$type string | PhpParser\Node\Name | PhpParser\Node\NullableType Type hint to use
    public function setTypeHint($type) {
        $this->type = $this->normalizeType($type);
        if ($this->type === 'void') {
            throw new \LogicException('Parameter type cannot be void');
        }

        return $this;
    }