code: public function resolve(ResponseInterface $response)
      {
          if (HttpPromise::PENDING !== $this->state) {
              throw new \RuntimeException('Promise is already resolved');
          }
  
          $this->state = HttpPromise::FULFILLED;
          $this->response = $response;
          $this->doResolve($response);
      }
docs: Resolve this promise.
  
  @param ResponseInterface $response
  
  @internal