Skip to content

Commit

Permalink
Merge pull request #217 from sandervanhooft/send_null
Browse files Browse the repository at this point in the history
Fixes #653
  • Loading branch information
sandervanhooft authored Dec 15, 2022
2 parents 9ffd944 + b3d8b64 commit db6be3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MollieLaravelHttpClientAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand All @@ -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)) {
Expand Down

0 comments on commit db6be3d

Please sign in to comment.