| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 11 | 
| Code Lines | 5 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 16 | public function parse(?ResponseInterface $response): array | ||
| 17 |     { | ||
| 18 |         if (is_null($response)) { | ||
| 19 | throw new InvalidResponseException(InvalidResponseException::RESPONSE_NONE); | ||
| 20 | } | ||
| 21 | |||
| 22 | $contents = $response->getBody()->getContents(); | ||
| 23 | |||
| 24 | $result = json_decode($contents, true); | ||
| 25 | |||
| 26 |         if (JSON_ERROR_NONE !== json_last_error()) { | ||
| 27 | throw new InvalidResponseException(InvalidResponseException::UNPACK_RESPONSE_ERROR, 'Unpack Response Error', [$contents]); | ||
| 33 |