kahlan\Allow::toReceive PHP Method

toReceive() public method

Stub a chain of methods.
public toReceive ( ) : self.
return self.
    public function toReceive()
    {
        if (!$this->_isClass) {
            throw new Exception("Error `toReceive()` are only available on classes/instances not functions.");
        }
        return $this->_method = $this->_stub->method(func_get_args());
    }