| Total Complexity | 7 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 89.47% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class SymfonyResponse implements HttpClientResponse |
||
| 11 | { |
||
| 12 | use NeedsParseHeaders; |
||
| 13 | |||
| 14 | protected ResponseInterface $response; |
||
| 15 | |||
| 16 | private string $contents; |
||
| 17 | |||
| 18 | 12 | public function __construct(ResponseInterface $response, string $contents = '') |
|
| 19 | { |
||
| 20 | 12 | $this->response = $response; |
|
| 21 | 12 | $this->contents = $contents; |
|
| 22 | 12 | } |
|
| 23 | |||
| 24 | 5 | public function getStatusCode(): int |
|
| 25 | { |
||
| 26 | 5 | return $this->response->getStatusCode(); |
|
| 27 | } |
||
| 28 | |||
| 29 | 1 | public function getHeaders(): array |
|
| 30 | { |
||
| 31 | 1 | return $this->parseHeaders($this->response->getHeaders(false)); |
|
| 32 | } |
||
| 33 | |||
| 34 | public function getBody(): string |
||
| 37 | } |
||
| 38 | |||
| 39 | 11 | public function parseJson(): array |
|
| 52 | } |
||
| 53 | |||
| 54 | 11 | private function toString(): string |
|
| 55 | { |
||
| 59 |