From 551ea7fd13b97e89f496a9f33c716f117e60a979 Mon Sep 17 00:00:00 2001 From: Albert Chen Date: Mon, 2 Dec 2024 14:48:18 +0800 Subject: [PATCH] chore: fix php-cs --- src/support/src/Testing/Fakes/BusFake.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/support/src/Testing/Fakes/BusFake.php b/src/support/src/Testing/Fakes/BusFake.php index 60d0a67..704e6b5 100644 --- a/src/support/src/Testing/Fakes/BusFake.php +++ b/src/support/src/Testing/Fakes/BusFake.php @@ -10,7 +10,7 @@ // use Illuminate\Bus\PendingBatch; // use Illuminate\Contracts\Bus\QueueingDispatcher; // use Illuminate\Support\Arr; -// use Illuminate\Support\Collection; +// use Hyperf\Collection\Collection; // use Illuminate\Support\Traits\ReflectsClosures; use Hyperf\Collection\Arr; use Hyperf\Collection\Collection; @@ -537,9 +537,8 @@ public function dispatch(mixed $command): mixed { if ($this->shouldFakeJob($command)) { return $this->commands[get_class($command)][] = $this->getCommandRepresentation($command); - } else { - return $this->dispatcher->dispatch($command); } + return $this->dispatcher->dispatch($command); } /** @@ -551,9 +550,8 @@ public function dispatchSync(mixed $command, mixed $handler = null): mixed { if ($this->shouldFakeJob($command)) { return $this->commandsSync[get_class($command)][] = $this->getCommandRepresentation($command); - } else { - return $this->dispatcher->dispatchSync($command, $handler); } + return $this->dispatcher->dispatchSync($command, $handler); } /** @@ -563,9 +561,8 @@ public function dispatchNow(mixed $command, mixed $handler = null): mixed { if ($this->shouldFakeJob($command)) { return $this->commands[get_class($command)][] = $this->getCommandRepresentation($command); - } else { - return $this->dispatcher->dispatchNow($command, $handler); } + return $this->dispatcher->dispatchNow($command, $handler); } /** @@ -575,9 +572,8 @@ public function dispatchToQueue(mixed $command): mixed { if ($this->shouldFakeJob($command)) { return $this->commands[get_class($command)][] = $this->getCommandRepresentation($command); - } else { - return $this->dispatcher->dispatchToQueue($command); } + return $this->dispatcher->dispatchToQueue($command); } /** @@ -587,9 +583,8 @@ public function dispatchAfterResponse(mixed $command): mixed { if ($this->shouldFakeJob($command)) { return $this->commandsAfterResponse[get_class($command)][] = $this->getCommandRepresentation($command); - } else { - return $this->dispatcher->dispatch($command); } + return $this->dispatcher->dispatch($command); } /**