isOk($response) && $retries < $this->retries) { return true; } return false; }, function () { return $this->delay; }); } /** * Check the response status is correct. */ protected function isOk(?ResponseInterface $response): bool { return $response && $response->getStatusCode() >= 200 && $response->getStatusCode() < 300; } }