src/Reflection/ReflectionFunctionAbstract.php
public function setReturnType(string $newReturnType) : void
    {
        $this->node->returnType = new Node\Name($newReturnType);
    }
public function setReturnType(string $newReturnType) : void
    {
        $this->node->returnType = new Node\Name($newReturnType);
    }
Set the return type declaration.