| Total Complexity | 5 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | class ClientResponse implements HttpClientResponse |
||
| 8 | { |
||
| 9 | protected array $headers; |
||
| 10 | protected int $status; |
||
| 11 | protected string $body; |
||
| 12 | |||
| 13 | public function __construct(array $response) |
||
| 14 | { |
||
| 15 | $this->headers = $response['headers']; |
||
| 16 | $this->status = $response['status']; |
||
| 17 | $this->body = $response['body']; |
||
| 18 | } |
||
| 19 | |||
| 20 | public function getStatusCode(): int |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getHeaders(): array |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getBody(): string |
||
| 31 | { |
||
| 32 | return $this->body; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function parseJson(): array |
||
| 38 | } |
||
| 39 | } |
||
| 40 |