diff --git a/src/MollieLaravelHttpClientAdapter.php b/src/MollieLaravelHttpClientAdapter.php index 6c790a0..cbd87ef 100644 --- a/src/MollieLaravelHttpClientAdapter.php +++ b/src/MollieLaravelHttpClientAdapter.php @@ -11,7 +11,7 @@ class MollieLaravelHttpClientAdapter implements MollieHttpAdapterInterface { private const HTTP_NO_CONTENT = 204; - public function send($httpMethod, $url, $headers, $httpBody): object + public function send($httpMethod, $url, $headers, $httpBody): ?object { $contentType = $headers['Content-Type'] ?? 'application/json'; unset($headers['Content-Type']); @@ -23,7 +23,7 @@ public function send($httpMethod, $url, $headers, $httpBody): object return $this->parseResponseBody($response); } - private function parseResponseBody(Response $response) + private function parseResponseBody(Response $response): ?object { $body = $response->body(); if (empty($body)) {