diff --git a/lib/Commands/Init.php b/lib/Commands/Init.php index c19251078cedf3d58850df8b2fad809b8bcbb9e3..83d0ae47a072e216c3e9c89bcab77300bf40805a 100644 --- a/lib/Commands/Init.php +++ b/lib/Commands/Init.php @@ -32,7 +32,7 @@ final class Init extends Command $config->set('php', array_combine( SupportedPHPVersions::getDefaultVersions(), array_map( - fn(string $version): int => SupportedPHPVersions::mapPort($version), + fn(string $version): array => SupportedPHPVersions::mapPort($version), SupportedPHPVersions::getDefaultVersions() ) )); @@ -42,4 +42,4 @@ final class Init extends Command return Command::SUCCESS; } -} \ No newline at end of file +} diff --git a/lib/SupportedPHPVersions.php b/lib/SupportedPHPVersions.php index 6309a86fbb2ad86faaec7ae144fc912beab8646b..7b9ac39509c079a2f0a2ebd09b14dc3d28761948 100644 --- a/lib/SupportedPHPVersions.php +++ b/lib/SupportedPHPVersions.php @@ -25,7 +25,7 @@ final class SupportedPHPVersions return self::DEFAULT; } - public static function mapPort(string $version): int + public static function mapPort(string $version): array { if (!isset(self::CONFIGURATION[$version])) { throw new \Exception('Unsupported php version'); diff --git a/web/index.php b/web/index.php index a238c728d8b167b2d95b27756babed9ba4d68c83..41cc51ff05126699931bbb3ef811fd92cd1fd39a 100644 --- a/web/index.php +++ b/web/index.php @@ -49,7 +49,7 @@ $log = new LogParser(__DIR__ . '/../logs/php/error.log'); </td> <?php foreach ($versions as $version => [$port, $sslPort]): ?> <td> - <a href="https://localhost:<?= $port ?>/<?= htmlentities($path) ?>"> + <a href="http://localhost:<?= $port ?>/<?= htmlentities($path) ?>"> <?= htmlentities($version) ?> </a> <a href="https://localhost:<?= $sslPort ?>/<?= htmlentities($path) ?>">