| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | protected function curl($target, array $options = []) |
||
|
|
|||
| 27 | 2 | { |
|
| 28 | $success = true; |
||
| 29 | 2 | $ch = curl_init(); |
|
| 30 | curl_setopt($ch, CURLOPT_URL, $target); |
||
| 31 | 2 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
| 32 | 1 | if (!curl_exec($ch)) { |
|
| 33 | $success = false; |
||
| 34 | } |
||
| 35 | 1 | curl_close($ch); |
|
| 36 | |||
| 37 | 1 | return $success; |
|
| 38 | } |
||
| 39 | |||
| 61 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.