PhpParser\Builder\FunctionLike::setReturnType PHP Method

setReturnType() public method

Sets the return type for PHP 7.
public setReturnType ( string | Name | NullableType $type )
$type string | PhpParser\Node\Name | PhpParser\Node\NullableType One of array, callable, string, int, float, bool, iterable, or a class/interface name.
    public function setReturnType($type)
    {
        $this->returnType = $this->normalizeType($type);

        return $this;
    }