| Conditions | 3 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 9 | public static function generateApi(): void { |
||
| 10 | if (!file_exists('sami.phar')) { |
||
| 11 | self::downloadSami(); |
||
| 12 | } |
||
| 13 | |||
| 14 | if (strpos(phpversion(), '7.4') !== false) { |
||
| 15 | die(" |
||
| 16 | Sami cannot run on PHP 7.4 due to some deprecations. |
||
| 17 | If you have installed some other php versions, you could manually run it: |
||
| 18 | |||
| 19 | php7.3 sami.phar update sami.php |
||
| 20 | |||
| 21 | " |
||
| 22 | ); |
||
| 23 | } |
||
| 24 | |||
| 25 | exec("php sami.phar update sami.php"); |
||
| 26 | } |
||
| 27 | |||
| 49 |