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