From 107d460f0d0ea47a086a13aa00355821596af049 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+github@gmail.com> Date: Wed, 12 Jun 2024 20:47:14 +0200 Subject: [PATCH] fix init --- lib/Commands/Init.php | 4 ++-- lib/SupportedPHPVersions.php | 2 +- web/index.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Commands/Init.php b/lib/Commands/Init.php index c192510..83d0ae4 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 6309a86..7b9ac39 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 a238c72..41cc51f 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) ?>"> -- GitLab