src/Deferred.php
public function resolve(ResponseInterface $response): void
    {
        if (Promise::PENDING !== $this->state) {
            return;
        }

        $this->value = $response;
        $this->state = Promise::FULFILLED;

        foreach ($this->onFulfilledCallbacks as $onFulfilledCallback) {
            $onFulfilledCallback($response);
        }
    }
public function resolve(ResponseInterface $response): void
    {
        if (Promise::PENDING !== $this->state) {
            return;
        }

        $this->value = $response;
        $this->state = Promise::FULFILLED;

        foreach ($this->onFulfilledCallbacks as $onFulfilledCallback) {
            $onFulfilledCallback($response);
        }
    }
public function resolve ( ResponseInterface $ response ) : void { if ( Promise :: PENDING !== $ this -> state ) { return ; } $ this -> value = $ response ; $ this -> state = Promise :: FULFILLED ; foreach ( $ this -> onFulfilledCallbacks as $ onFulfilledCallback ) { $ onFulfilledCallback ( $ response ) ; } }
Resolve this deferred with a Response.
Resolve this deferred with a Response .