| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 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 | ); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |