| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | protected function getContent(string $url, array $headers = []): string |
||
| 52 | { |
||
| 53 | $request = $this->requestFactory->createRequest('GET', $url, $headers); |
||
| 54 | $response = $this->client->sendRequest($request); |
||
| 55 | |||
| 56 | if (200 !== $response->getStatusCode()) { |
||
| 57 | throw new \HttpRuntimeException('Unable to get the key set.', $response->getStatusCode()); |
||
| 58 | } |
||
| 59 | |||
| 60 | return $response->getBody()->getContents(); |
||
| 61 | } |
||
| 62 | } |
||
| 63 |