From 36698fcc4769d2e95260be9840a93346c6f38e3d Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean Date: Thu, 22 Aug 2024 16:26:06 +0700 Subject: [PATCH] fix: errors on GA --- system/Commands/Utilities/PhpIniCheck.php | 2 +- tests/system/Commands/Utilities/PhpIniCheckTest.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/system/Commands/Utilities/PhpIniCheck.php b/system/Commands/Utilities/PhpIniCheck.php index df3d8376a7d3..f13d3d7f8fe9 100644 --- a/system/Commands/Utilities/PhpIniCheck.php +++ b/system/Commands/Utilities/PhpIniCheck.php @@ -80,7 +80,7 @@ public function run(array $params) return EXIT_ERROR; } - $argument = isset($params[0]) && $params[0] ? $params[0] : null; + $argument = $params[0] ?? null; CheckPhpIni::run(argument: $argument); diff --git a/tests/system/Commands/Utilities/PhpIniCheckTest.php b/tests/system/Commands/Utilities/PhpIniCheckTest.php index dd5180acbb5a..7a5e204dcd2f 100644 --- a/tests/system/Commands/Utilities/PhpIniCheckTest.php +++ b/tests/system/Commands/Utilities/PhpIniCheckTest.php @@ -15,7 +15,6 @@ use CodeIgniter\Test\CIUnitTestCase; use CodeIgniter\Test\StreamFilterTrait; -use Config\App; use PHPUnit\Framework\Attributes\Group; /** @@ -38,7 +37,7 @@ protected function tearDown(): void parent::tearDown(); } - protected function getBuffer() + protected function getBuffer(): string { return $this->getStreamFilterBuffer(); } @@ -60,7 +59,7 @@ public function testCommandCheckOpcache(): void { command('phpini:check opcache'); - $this->assertStringContainsString("opcache.save_comments", $this->getBuffer()); + $this->assertStringContainsString('opcache.save_comments', $this->getBuffer()); } public function testCommandCheckNoExistsArg(): void