|
11 | 11 | } |
12 | 12 |
|
13 | 13 | if ($options['os'] === 'windows') { |
14 | | - if ($options['osvariant'] === 'windows-wsl-debian') { |
15 | | - $options['os'] = 'linux'; |
16 | | - $options['osvariant'] = 'linux-debian'; |
17 | | - } |
18 | | - if ($options['osvariant'] === 'windows-wsl-ubuntu') { |
19 | | - $options['os'] = 'linux'; |
20 | | - $options['osvariant'] = 'linux-ubuntu'; |
21 | | - } |
| 14 | + if ($options['osvariant'] === 'windows-wsl-debian') { |
| 15 | + $options['os'] = 'linux'; |
| 16 | + $options['osvariant'] = 'linux-debian'; |
| 17 | + } |
| 18 | + if ($options['osvariant'] === 'windows-wsl-ubuntu') { |
| 19 | + $options['os'] = 'linux'; |
| 20 | + $options['osvariant'] = 'linux-ubuntu'; |
| 21 | + } |
22 | 22 | } |
23 | 23 | if ($options['os'] === 'osx' || $options['os'] === 'windows') { |
24 | 24 | if ($options['version'] === 'default') { |
25 | | - $options['version'] = $latestPhpVersion; |
26 | | - } |
| 25 | + $options['version'] = $latestPhpVersion; |
| 26 | + } |
27 | 27 | } |
28 | 28 |
|
29 | 29 | if (in_array($options['usage'], ['fw-drupal', 'fw-laravel', 'fw-symfony', 'fw-wordpress'])) { |
30 | | - $file = "{$options['usage']}"; |
31 | | - $options['os'] = null; |
| 30 | + $file = "{$options['usage']}"; |
| 31 | + $options['os'] = null; |
32 | 32 | } |
33 | 33 |
|
34 | 34 | $multiversion = false; |
35 | 35 |
|
36 | 36 | if (array_key_exists('multiversion', $options)) { |
37 | | - $multiversion = $options['multiversion'] === 'Y'; |
| 37 | + $multiversion = $options['multiversion'] === 'Y'; |
38 | 38 | } |
39 | 39 |
|
40 | 40 | $source = false; |
41 | 41 |
|
42 | 42 | if (array_key_exists('source', $options)) { |
43 | | - if ($options['source'] === 'Y') { |
44 | | - $source = $options['source'] === 'Y'; |
45 | | - } |
| 43 | + if ($options['source'] === 'Y') { |
| 44 | + $source = $options['source'] === 'Y'; |
| 45 | + } |
46 | 46 | } |
47 | 47 |
|
48 | 48 | switch ($options['os']) { |
49 | | - case 'linux': |
50 | | - $defaultOrCommunity = ($options['version'] !== 'default' || $multiversion) ? 'community' : 'default'; |
51 | | - if ($defaultOrCommunity === 'community' && $options['version'] == 'default') { |
52 | | - $options['version'] = $latestPhpVersion; |
53 | | - } |
54 | | - $file = "{$options['osvariant']}-{$options['usage']}-{$defaultOrCommunity}"; |
55 | | - break; |
56 | | - case 'osx': |
57 | | - case 'windows': |
58 | | - $file = "{$options['osvariant']}"; |
59 | | - break; |
| 49 | + case 'linux': |
| 50 | + $defaultOrCommunity = ($options['version'] !== 'default' || $multiversion) ? 'community' : 'default'; |
| 51 | + if ($defaultOrCommunity === 'community' && $options['version'] == 'default') { |
| 52 | + $options['version'] = $latestPhpVersion; |
| 53 | + } |
| 54 | + $file = "{$options['osvariant']}-{$options['usage']}-{$defaultOrCommunity}"; |
| 55 | + break; |
| 56 | + case 'osx': |
| 57 | + case 'windows': |
| 58 | + $file = "{$options['osvariant']}"; |
| 59 | + break; |
60 | 60 | } |
61 | 61 |
|
62 | 62 | if ($source) { |
|
67 | 67 | $versionNoDot = str_replace('.', '', $version); |
68 | 68 |
|
69 | 69 | if (file_exists(__DIR__ . "/include/download-instructions/{$file}.php")) { |
70 | | - include __DIR__ . "/include/download-instructions/{$file}.php"; |
71 | | - if ($source) { |
72 | | - return false; |
73 | | - } |
74 | | - return true; |
| 70 | + include __DIR__ . "/include/download-instructions/{$file}.php"; |
| 71 | + if ($source) { |
| 72 | + return false; |
| 73 | + } |
| 74 | + return true; |
75 | 75 | } else { |
76 | 76 | ?> |
77 | 77 | <p> |
78 | 78 | There are no instructions yet. Try using the <a href="https://www.php.net/manual/en/install.php">generic installation from source</a>. |
79 | 79 | </p> |
80 | 80 | <?php |
81 | | - return false; |
| 81 | + return false; |
82 | 82 | } |
83 | 83 | ?> |
0 commit comments