Author: Derick Rethans (derickr) Date: 2025-08-12T14:29:33+01:00 Commit: https://github.com/php/web-php/commit/72926fc33576cad7afa6c0885cf02c0f0c2e9f61 Raw diff: https://github.com/php/web-php/commit/72926fc33576cad7afa6c0885cf02c0f0c2e9f61.diff
Use spaces for indentation Changed paths: M downloads-get-instructions.php M downloads.php Diff: diff --git a/downloads-get-instructions.php b/downloads-get-instructions.php index 09831f672a..aabc617978 100644 --- a/downloads-get-instructions.php +++ b/downloads-get-instructions.php @@ -11,52 +11,52 @@ } if ($options['os'] === 'windows') { - if ($options['osvariant'] === 'windows-wsl-debian') { - $options['os'] = 'linux'; - $options['osvariant'] = 'linux-debian'; - } - if ($options['osvariant'] === 'windows-wsl-ubuntu') { - $options['os'] = 'linux'; - $options['osvariant'] = 'linux-ubuntu'; - } + if ($options['osvariant'] === 'windows-wsl-debian') { + $options['os'] = 'linux'; + $options['osvariant'] = 'linux-debian'; + } + if ($options['osvariant'] === 'windows-wsl-ubuntu') { + $options['os'] = 'linux'; + $options['osvariant'] = 'linux-ubuntu'; + } } if ($options['os'] === 'osx' || $options['os'] === 'windows') { if ($options['version'] === 'default') { - $options['version'] = $latestPhpVersion; - } + $options['version'] = $latestPhpVersion; + } } if (in_array($options['usage'], ['fw-drupal', 'fw-laravel', 'fw-symfony', 'fw-wordpress'])) { - $file = "{$options['usage']}"; - $options['os'] = null; + $file = "{$options['usage']}"; + $options['os'] = null; } $multiversion = false; if (array_key_exists('multiversion', $options)) { - $multiversion = $options['multiversion'] === 'Y'; + $multiversion = $options['multiversion'] === 'Y'; } $source = false; if (array_key_exists('source', $options)) { - if ($options['source'] === 'Y') { - $source = $options['source'] === 'Y'; - } + if ($options['source'] === 'Y') { + $source = $options['source'] === 'Y'; + } } switch ($options['os']) { - case 'linux': - $defaultOrCommunity = ($options['version'] !== 'default' || $multiversion) ? 'community' : 'default'; - if ($defaultOrCommunity === 'community' && $options['version'] == 'default') { - $options['version'] = $latestPhpVersion; - } - $file = "{$options['osvariant']}-{$options['usage']}-{$defaultOrCommunity}"; - break; - case 'osx': - case 'windows': - $file = "{$options['osvariant']}"; - break; + case 'linux': + $defaultOrCommunity = ($options['version'] !== 'default' || $multiversion) ? 'community' : 'default'; + if ($defaultOrCommunity === 'community' && $options['version'] == 'default') { + $options['version'] = $latestPhpVersion; + } + $file = "{$options['osvariant']}-{$options['usage']}-{$defaultOrCommunity}"; + break; + case 'osx': + case 'windows': + $file = "{$options['osvariant']}"; + break; } if ($source) { @@ -67,17 +67,17 @@ $versionNoDot = str_replace('.', '', $version); if (file_exists(__DIR__ . "/include/download-instructions/{$file}.php")) { - include __DIR__ . "/include/download-instructions/{$file}.php"; - if ($source) { - return false; - } - return true; + include __DIR__ . "/include/download-instructions/{$file}.php"; + if ($source) { + return false; + } + return true; } else { ?> <p> There are no instructions yet. Try using the <a href="https://www.php.net/manual/en/install.php">generic installation from source</a>. </p> <?php - return false; + return false; } ?> diff --git a/downloads.php b/downloads.php index 8a30ac162e..ae8ba587d4 100644 --- a/downloads.php +++ b/downloads.php @@ -67,23 +67,23 @@ function option(string $value, string $desc, $attributes = []): string 'linux-debian' => 'Debian', 'linux-fedora' => 'Fedora', 'linux-redhat' => 'RedHat', - 'linux-ubuntu' => 'Ubuntu', + 'linux-ubuntu' => 'Ubuntu', ], ], 'osx' => [ 'name' => 'macOS', 'variants' => [ 'osx-homebrew' => 'Homebrew/Brew', - 'osx-homebrew-php' => 'Homebrew/Homebrew-PHP', - 'osx-macports' => 'MacPorts', + 'osx-homebrew-php' => 'Homebrew/Homebrew-PHP', + 'osx-macports' => 'MacPorts', ], ], 'windows' => [ 'name' => 'Windows', 'variants' => [ - 'windows-native' => 'Windows Native Build', - 'windows-chocolatey' => 'Windows with Chocolatey', - 'windows-scoop' => 'Windows with Scoop', + 'windows-native' => 'Windows Native Build', + 'windows-chocolatey' => 'Windows with Chocolatey', + 'windows-scoop' => 'Windows with Scoop', 'windows-wsl-debian' => 'Windows with WSL/Debian', 'windows-wsl-ubuntu' => 'Windows with WSL/Ubuntu', ],