| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 28 | private static function downloadSami(): void { |
||
| 29 | if (!extension_loaded('curl')) { |
||
| 30 | die(" |
||
| 31 | You should enable `curl` extensions in your php.ini, to download sami. |
||
| 32 | Alternatively, you can download it manually from http://get.sensiolabs.org/sami.phar |
||
| 33 | "); |
||
| 34 | } |
||
| 35 | |||
| 36 | $fp = fopen('./sami.phar', 'wb'); |
||
| 37 | |||
| 38 | echo "Donload sami..."; |
||
| 39 | $ch = curl_init('http://get.sensiolabs.org/sami.phar'); |
||
| 40 | curl_setopt($ch, CURLOPT_FILE, $fp); |
||
| 41 | curl_setopt($ch, CURLOPT_HEADER, 0); |
||
| 42 | curl_exec($ch); |
||
| 43 | curl_close($ch); |
||
| 44 | echo "done!\n"; |
||
| 45 | |||
| 46 | fclose($fp); |
||
| 47 | } |
||
| 48 | } |
||
| 49 |