Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function build(ResponseInterface $response): Body |
||
33 | { |
||
34 | $body = $response->getBody(); |
||
35 | $body->rewind(); |
||
36 | $jsonResponse = (object)Json::decode($body->getContents()); |
||
37 | |||
38 | // #TODO handle results fields: count, total, summary, result |
||
39 | return new CommonBody( |
||
40 | $jsonResponse->result, |
||
41 | $jsonResponse->principal, |
||
42 | $jsonResponse->error, |
||
43 | $jsonResponse->id, |
||
44 | $jsonResponse->version |
||
45 | ); |
||
48 |