From da53bd65795ae9b88257f44a905f65e9b6a2b67d Mon Sep 17 00:00:00 2001 From: spiralbot Date: Fri, 24 Jan 2025 11:16:17 +0000 Subject: [PATCH] Merge pull request #1208: Apply risky Code Style rules --- tests/ConfigTest.php | 8 ++++---- tests/FactoryTest.php | 4 ++-- tests/SessionTest.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index 24c42f83..94456543 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -21,7 +21,7 @@ public function testConfig(): void 'handlers' => [ 'files' => [ 'class' => FileHandler::class, - 'options' => ['directory' => sys_get_temp_dir()], + 'options' => ['directory' => \sys_get_temp_dir()], ], ], ]); @@ -31,7 +31,7 @@ public function testConfig(): void self::assertSame(86400, $c->getLifetime()); self::assertNull($c->getSameSite()); self::assertEquals(new Autowire(FileHandler::class, [ - 'directory' => sys_get_temp_dir(), + 'directory' => \sys_get_temp_dir(), ]), $c->getHandler()); } @@ -41,11 +41,11 @@ public function testConfigAutowired(): void 'lifetime' => 86400, 'cookie' => 'SID', 'secure' => false, - 'handler' => new Autowire(FileHandler::class, ['directory' => sys_get_temp_dir()]), + 'handler' => new Autowire(FileHandler::class, ['directory' => \sys_get_temp_dir()]), ]); self::assertEquals(new Autowire(FileHandler::class, [ - 'directory' => sys_get_temp_dir(), + 'directory' => \sys_get_temp_dir(), ]), $c->getHandler()); } } diff --git a/tests/FactoryTest.php b/tests/FactoryTest.php index c3e68d59..cfe3a315 100644 --- a/tests/FactoryTest.php +++ b/tests/FactoryTest.php @@ -67,8 +67,8 @@ public function testMultipleSessions(): void protected function tearDown(): void { - if ((int) session_status() === PHP_SESSION_ACTIVE) { - session_abort(); + if ((int) \session_status() === PHP_SESSION_ACTIVE) { + \session_abort(); } } } diff --git a/tests/SessionTest.php b/tests/SessionTest.php index 39d4335a..b36f02b8 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -216,15 +216,15 @@ protected function setUp(): void 'cookie' => 'SID', 'secure' => false, 'handler' => new Container\Autowire(FileHandler::class, [ - 'directory' => sys_get_temp_dir(), + 'directory' => \sys_get_temp_dir(), ]), ]), $this->container); } protected function tearDown(): void { - if ((int) session_status() === PHP_SESSION_ACTIVE) { - session_abort(); + if ((int) \session_status() === PHP_SESSION_ACTIVE) { + \session_abort(); } } }