From 9a5e106feea876c377305a0b1fb03a2ba847a4e3 Mon Sep 17 00:00:00 2001 From: spiralbot Date: Wed, 1 Jan 2025 18:50:10 +0000 Subject: [PATCH] refactor: Add ArrowFunction return type #1183 --- tests/BootloadManager/BootloadConfigTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/BootloadManager/BootloadConfigTest.php b/tests/BootloadManager/BootloadConfigTest.php index ce4549a..3e3fde5 100644 --- a/tests/BootloadManager/BootloadConfigTest.php +++ b/tests/BootloadManager/BootloadConfigTest.php @@ -66,7 +66,7 @@ public function testDisabledConfig(): void public function testCallableConfig(): void { $result = \iterator_to_array($this->initializer->init([ - BootloaderA::class => static fn () => new BootloadConfig(args: ['a' => 'b']), + BootloaderA::class => static fn (): BootloadConfig => new BootloadConfig(args: ['a' => 'b']), ])); $this->assertEquals([ @@ -79,12 +79,12 @@ public function testCallableConfigWithArguments(): void $this->container->bind(AppEnvironment::class, AppEnvironment::Production); $result = \iterator_to_array($this->initializer->init([ - BootloaderA::class => static fn (AppEnvironment $env) => new BootloadConfig(enabled: $env->isLocal()), + BootloaderA::class => static fn (AppEnvironment $env): BootloadConfig => new BootloadConfig(enabled: $env->isLocal()), ])); $this->assertEquals([], $result); $result = \iterator_to_array($this->initializer->init([ - BootloaderA::class => static fn (AppEnvironment $env) => new BootloadConfig(enabled: $env->isProduction()), + BootloaderA::class => static fn (AppEnvironment $env): BootloadConfig => new BootloadConfig(enabled: $env->isProduction()), ])); $this->assertEquals([BootloaderA::class => ['bootloader' => new BootloaderA(), 'options' => []]], $result); }