Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 3 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
46 | 3 | public function fetch($url) |
|
47 | { |
||
48 | 3 | $ch = curl_init($url); |
|
49 | 3 | curl_setopt($ch, CURLOPT_URL, $url); |
|
50 | 3 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
51 | 3 | curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); |
|
52 | 3 | curl_setopt_array($ch, $this->curlOptions); |
|
53 | |||
54 | 3 | $content = curl_exec($ch); |
|
55 | 3 | curl_close($ch); |
|
56 | |||
57 | 3 | return $content; |
|
58 | } |
||
59 | } |
||
60 |