Skip to content

Commit

Permalink
Add docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
jenky committed Jun 20, 2023
1 parent b9381b4 commit b70d9ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Decoder/JsonDecoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public function decode(ResponseInterface $response): array
return json_decode((string) $response->getBody(), true) ?? [];
}

/**
* Determine wether decoder is supported for given response.
*/
private function supports(ResponseInterface $response): bool
{
return mb_strpos($response->getHeaderLine('Content-Type'), 'json') !== false;
Expand Down
3 changes: 3 additions & 0 deletions src/Decoder/XmlDecoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public function decode(ResponseInterface $response): array
);
}

/**
* Determine wether decoder is supported for given response.
*/
private function supports(ResponseInterface $response): bool
{
return mb_strpos($response->getHeaderLine('Content-Type'), 'xml') !== false;
Expand Down

0 comments on commit b70d9ee

Please sign in to comment.