src/main/php/FunctionProxy.php
public function returns($returnValue): self
    {
        if ($this->returnVoid) {
            throw new \LogicException(
                'Trying to map function ' . $this->name
                . '(), but it is declared as returning void.'
            );
        }

        $this->callMap = new CallMap(['function' => $returnValue]);
        return $this;
    }
public function returns($returnValue): self
    {
        if ($this->returnVoid) {
            throw new \LogicException(
                'Trying to map function ' . $this->name
                . '(), but it is declared as returning void.'
            );
        }

        $this->callMap = new CallMap(['function' => $returnValue]);
        return $this;
    }
public function returns ( $ returnValue ) : self { if ( $ this -> returnVoid ) { throw new \ LogicException ( 'Trying to map function ' . $ this -> name . '(), but it is declared as returning void.' ) ; } $ this -> callMap = new CallMap ( [ 'function' => $ returnValue ] ) ; return $ this ; }
sets the call map to use

@api
@param   mixed  $returnValue
@return  $this
@throws  \LogicException when mapped function is declared as returning void
@since   3.2.0
sets the call map to use