call($method, $url, $options); return $response->toArray(); } catch (Exception $exception) { return null; } } /** * @throws TransportExceptionInterface */ public function status(string $method, string $url, array $options): ?int { try { $response = $this->call($method, $url, $options); return $response->getStatusCode(); } catch (Exception $exception) { return null; } } /** * @throws TransportExceptionInterface */ private function call(string $method, string $url, array $options): ResponseInterface { $httpClient = HttpClient::create(); return $httpClient->request($method, $url, $options); } }