public function unstub(string $name, callable $callable, ...$args): self
    {
        $index = i\iterable_find_key($this->steps, function ($step) use ($name) {
            return $step[0] instanceof Stub && $step[0]->getName() === $name;
        });

        if ($index === null) {
            throw new \BadMethodCallException("Pipeline builder doesn't have '$name' stub");
        }

        $clone = clone $this;
        $clone->steps[$index] = [$callable, $args];

        return $clone;
    }
public function unstub(string $name, callable $callable, ...$args): self
    {
        $index = i\iterable_find_key($this->steps, function ($step) use ($name) {
            return $step[0] instanceof Stub && $step[0]->getName() === $name;
        });

        if ($index === null) {
            throw new \BadMethodCallException("Pipeline builder doesn't have '$name' stub");
        }

        $clone = clone $this;
        $clone->steps[$index] = [$callable, $args];

        return $clone;
    }
public function unstub ( string $ name , callable $ callable , ... $ args ) : self { $ index = i \ iterable_find_key ( $ this -> steps , function ( $ step ) use ( $ name ) { return $ step [ 0 ] instanceof Stub && $ step [ 0 ] -> getName ( ) === $ name ; } ) ; if ( $ index === null ) { throw new \ BadMethodCallException ( "Pipeline builder doesn't have '$name' stub" ) ; } $ clone = clone $ this ; $ clone -> steps [ $ index ] = [ $ callable , $ args ] ; return $ clone ; }
Get a pipeline builder where a stub is replaced.

@param string   $name
@param callable $callable
@param mixed    ...$args
@return static
Get a pipeline builder where a stub is replaced .