diff --git a/src/RoadRunnerMode.php b/src/RoadRunnerMode.php index 338862f..ac743cb 100644 --- a/src/RoadRunnerMode.php +++ b/src/RoadRunnerMode.php @@ -22,6 +22,6 @@ public static function detect(EnvironmentInterface $environment): self { $value = $environment->getMode(); - return (self::tryFrom($value) ?? self::Unknown); + return self::tryFrom($value) ?? self::Unknown; } } diff --git a/tests/src/Queue/DispatcherTest.php b/tests/src/Queue/DispatcherTest.php index e0d6233..0784be2 100644 --- a/tests/src/Queue/DispatcherTest.php +++ b/tests/src/Queue/DispatcherTest.php @@ -9,8 +9,6 @@ use Spiral\Queue\Failed\FailedJobHandlerInterface; use Spiral\Queue\HandlerInterface; use Spiral\Queue\HandlerRegistryInterface; -use Spiral\RoadRunner\Environment; -use Spiral\RoadRunner\EnvironmentInterface; use Spiral\RoadRunner\Jobs\ConsumerInterface; use Spiral\RoadRunner\Jobs\Task\ReceivedTaskInterface; use Spiral\RoadRunnerBridge\Queue\Dispatcher; diff --git a/tests/src/RoadRunnerModeTest.php b/tests/src/RoadRunnerModeTest.php index a206700..92a53ba 100644 --- a/tests/src/RoadRunnerModeTest.php +++ b/tests/src/RoadRunnerModeTest.php @@ -21,8 +21,8 @@ protected function setUp(): void */ public function testDetectMode(string $mode, RoadRunnerMode $expected): void { - $this->getContainer()->bind(EnvironmentInterface::class, static fn() => new Environment([ - 'RR_MODE' => $mode + $this->getContainer()->bind(EnvironmentInterface::class, static fn () => new Environment([ + 'RR_MODE' => $mode, ])); $this->assertSame($expected, $this->getContainer()->get(RoadRunnerMode::class)); diff --git a/tests/src/Tcp/DispatcherTest.php b/tests/src/Tcp/DispatcherTest.php index b9bd272..e40f21f 100644 --- a/tests/src/Tcp/DispatcherTest.php +++ b/tests/src/Tcp/DispatcherTest.php @@ -8,8 +8,6 @@ use Spiral\App\Tcp\TestInterceptor; use Spiral\App\Tcp\TestService; use Spiral\Boot\FinalizerInterface; -use Spiral\RoadRunner\Environment; -use Spiral\RoadRunner\EnvironmentInterface; use Spiral\RoadRunner\Payload; use Spiral\RoadRunner\Tcp\TcpWorkerInterface; use Spiral\RoadRunner\WorkerInterface;