Kahlan\Plugin\Stub\Method::andRun PHP Method

andRun() public method

Set the stub logic.
public andRun ( )
    public function andRun()
    {
        if ($this->_returns !== null) {
            throw new Exception("Some return value(s) has already been set.");
        }
        $closures = func_get_args();
        foreach ($closures as $closure) {
            if (!is_callable($closure)) {
                throw new Exception("The passed parameter is not callable.");
            }
        }
        $this->_closures = $closures;
    }