| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | private function wrapResponse($response) |
||
| 48 | { |
||
| 49 | if ($response instanceof HttpResponseInterface) { |
||
| 50 | return $response; |
||
| 51 | } |
||
| 52 | if (!method_exists($response, 'getBody')) { |
||
| 53 | |||
| 54 | throw new \ErrorException('Supplied client\'s response don\'t have method `getBody()`'); |
||
| 55 | } |
||
| 56 | return new HttpResponseWrapper($response); |
||
| 57 | } |
||
| 58 | } |
||
| 60 |