From 41050436ddb402ebd98939a23be5addc7bc99afe Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 31 Mar 2026 15:25:39 +0100 Subject: [PATCH 1/2] fix: remove getEnv method from Platform Co-Authored-By: Claude Sonnet 4.6 --- src/Platform/Platform.php | 13 ------------- tests/unit/GetEnvTest.php | 17 ----------------- 2 files changed, 30 deletions(-) delete mode 100644 tests/unit/GetEnvTest.php diff --git a/src/Platform/Platform.php b/src/Platform/Platform.php index 31d41d9..d88c657 100644 --- a/src/Platform/Platform.php +++ b/src/Platform/Platform.php @@ -345,17 +345,4 @@ public function setWorker(Server $worker): self return $this; } - /** - * Get env - * - * Method for querying env parameters. If $key is not found $default value will be returned. - * - * @param string $key - * @param string|null $default - * @return mixed - */ - public function getEnv(string $key, ?string $default = null): mixed - { - return $_SERVER[$key] ?? $default; - } } diff --git a/tests/unit/GetEnvTest.php b/tests/unit/GetEnvTest.php deleted file mode 100644 index 73b9c34..0000000 --- a/tests/unit/GetEnvTest.php +++ /dev/null @@ -1,17 +0,0 @@ -assertSame($_SERVER['argc'] ?? null, $platform->getEnv('argc')); - $this->assertSame('fallback', $platform->getEnv('UTOPIA_PLATFORM_MISSING_ENV', 'fallback')); - $this->assertNull($platform->getEnv('UTOPIA_PLATFORM_MISSING_ENV')); - } -} From 86833436374180e80ec7ef11e11897c69bc558ac Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Tue, 31 Mar 2026 15:40:32 +0100 Subject: [PATCH 2/2] fix: apply pint style fixes to Platform.php Co-Authored-By: Claude Sonnet 4.6 --- src/Platform/Platform.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Platform/Platform.php b/src/Platform/Platform.php index d88c657..7b90595 100644 --- a/src/Platform/Platform.php +++ b/src/Platform/Platform.php @@ -344,5 +344,4 @@ public function setWorker(Server $worker): self return $this; } - }