| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | 4 | public function getUrlData(string $url): IframelyDTO |
|
| 43 | { |
||
| 44 | 4 | $response = $this->client->request( |
|
| 45 | 4 | 'GET', |
|
| 46 | 4 | IframelyClientInterface::API_BASE_URI, |
|
| 47 | 4 | ['query' => ['api_key' => $this->apiKey, 'url' => $url, 'html' => 1]] |
|
| 48 | ); |
||
| 49 | |||
| 50 | 4 | return new IframelyDTO(json_decode($response->getBody()->getContents(), true)); |
|
| 51 | } |
||
| 52 | } |
||
| 53 |