private function outerPromise(PromiseInterface $inner): Promise
    {
        $outer = new Promise(function () use ($inner) {
            // Our wait function invokes the inner's wait function, as as far
            // as callers are concerned there is only one promise.
            try {
                $inner->wait();
            } catch (\Exception $e) {
                // The inner promise handles all rejections.
            }
        });

        return $outer;
    }
private function outerPromise(PromiseInterface $inner): Promise
    {
        $outer = new Promise(function () use ($inner) {
            // Our wait function invokes the inner's wait function, as as far
            // as callers are concerned there is only one promise.
            try {
                $inner->wait();
            } catch (\Exception $e) {
                // The inner promise handles all rejections.
            }
        });

        return $outer;
    }
private function outerPromise ( PromiseInterface $ inner ) : Promise { $ outer = new Promise ( function ( ) use ( $ inner ) { // Our wait function invokes the inner's wait function, as as far // as callers are concerned there is only one promise. try { $ inner -> wait ( ) ; } catch ( \ Exception $ e ) { // The inner promise handles all rejections. } } ) ; return $ outer ; }
Return a new promise that waits on another promise.

@param \GuzzleHttp\Promise\PromiseInterface $inner

@return \GuzzleHttp\Promise\Promise
Return a new promise that waits on another promise .