public function onSuccess(Closure $callback)
    {
        return $this->then(function (Container $container) use ($callback) {
            if (0 === $this->exitCode) {
                $container->call($callback);
            }
        });
    }
public function onSuccess(Closure $callback)
    {
        return $this->then(function (Container $container) use ($callback) {
            if (0 === $this->exitCode) {
                $container->call($callback);
            }
        });
    }
public function onSuccess ( Closure $ callback ) { return $ this -> then ( function ( Container $ container ) use ( $ callback ) { if ( 0 === $ this -> exitCode ) { $ container -> call ( $ callback ) ; } } ) ; }
Register a callback to be called if the operation succeeds.

@param  \Closure  $callback
@return $this
Register a callback to be called if the operation succeeds .