src/main/php/ClassProxyMethodHandler.php
public function returns(array $callMap): ClassProxy
    {
        foreach (array_keys($callMap) as $method) {
            if (!isset($this->_allowedMethods[$method]) || isset($this->_voidMethods[$method])) {
                throw new \InvalidArgumentException(
                        $this->canNot('map', $method)
                );
            }
        }

        $this->callMap = new CallMap($callMap);
        return $this;
    }
public function returns(array $callMap): ClassProxy
    {
        foreach (array_keys($callMap) as $method) {
            if (!isset($this->_allowedMethods[$method]) || isset($this->_voidMethods[$method])) {
                throw new \InvalidArgumentException(
                        $this->canNot('map', $method)
                );
            }
        }

        $this->callMap = new CallMap($callMap);
        return $this;
    }
public function returns ( array $ callMap ) : ClassProxy { foreach ( array_keys ( $ callMap ) as $ method ) { if ( ! isset ( $ this -> _allowedMethods [ $ method ] ) || isset ( $ this -> _voidMethods [ $ method ] ) ) { throw new \ InvalidArgumentException ( $ this -> canNot ( 'map' , $ method ) ) ; } } $ this -> callMap = new CallMap ( $ callMap ) ; return $ this ; }
sets the call map with return values

@api
@since   3.2.0
@param   array  $callMap
@return  ClassProxy
@throws  \InvalidArgumentException  in case any of the mapped methods does not exist or is not applicable
sets the call map with return values