| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 16 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 9 | 
| CRAP Score | 3.009 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 6 | 1 | public static function setup($ch) | |
| 7 |     { | ||
| 8 | 1 | static $sh; | |
| 9 | |||
| 10 | 1 |         if (!function_exists('curl_share_init')) { | |
| 11 | return; | ||
| 12 | } | ||
| 13 | |||
| 14 | 1 |         if (!$sh) { | |
| 15 | 1 | $sh = curl_share_init(); | |
| 16 | 1 | curl_share_setopt($sh, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS); | |
| 17 | 1 | curl_share_setopt($sh, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION); | |
| 18 | } | ||
| 19 | |||
| 20 | 1 | curl_setopt($ch, CURLOPT_SHARE, $sh); | |
| 21 | 1 | } | |
| 22 | } | ||
| 23 |