diff --git a/src/API/HTTPAdapter/CurlHTTPAdapter.php b/src/API/HTTPAdapter/CurlHTTPAdapter.php index 0958ac9..72af0f2 100644 --- a/src/API/HTTPAdapter/CurlHTTPAdapter.php +++ b/src/API/HTTPAdapter/CurlHTTPAdapter.php @@ -74,6 +74,6 @@ public function request(string $method, string $endpoint, array $params = [], ar $responseBody = json_decode((string)$response, true); - return new Response($statusCode, !is_array($responseBody) ? $responseBody : []); + return new Response($statusCode, is_array($responseBody) ? $responseBody : []); } } diff --git a/src/API/HTTPAdapter/Guzzle67HTTPAdapter.php b/src/API/HTTPAdapter/Guzzle67HTTPAdapter.php index 0c0475e..705d2f7 100644 --- a/src/API/HTTPAdapter/Guzzle67HTTPAdapter.php +++ b/src/API/HTTPAdapter/Guzzle67HTTPAdapter.php @@ -39,7 +39,7 @@ public function request(string $method, string $endpoint, array $params = [], ar $responseBody = json_decode((string)$response->getBody(), true); - return new Response($response->getStatusCode(), !is_array($responseBody) ? $responseBody : []); + return new Response($response->getStatusCode(), is_array($responseBody) ? $responseBody : []); } private function assertSuccessResponsePayload(ResponseInterface $response): void