Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function hydrate(ResponseInterface $response, string $class = null): array |
||
25 | { |
||
26 | if (!$this->isJsonResponse($response)) { |
||
27 | $message = 'The ArrayHydrator cannot hydrate a response with Content-Type: '; |
||
28 | |||
29 | throw new HydrationException($message.$response->getHeaderLine(self::HEADER_CONTENT_TYPE)); |
||
30 | } |
||
31 | |||
32 | $body = $this->getBodyContent($response); |
||
33 | |||
34 | return $body; |
||
35 | } |
||
37 |