| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 14 | public function curl($url) |
|
| 19 | { |
||
| 20 | 14 | $ch = curl_init(); |
|
| 21 | 14 | curl_setopt(/** @scrutinizer ignore-type */ $ch, CURLOPT_URL, $url); |
|
| 22 | 14 | curl_setopt(/** @scrutinizer ignore-type */ $ch, CURLOPT_RETURNTRANSFER, 1); |
|
| 23 | 14 | $apiresponse = curl_exec(/** @scrutinizer ignore-type */ $ch); |
|
| 24 | |||
| 25 | 14 | $jsonresp = json_decode($apiresponse, /** @scrutinizer ignore-type */ JSON_UNESCAPED_UNICODE); |
|
| 26 | 14 | return $jsonresp; |
|
| 27 | } |
||
| 29 |