From 516208142c54c88e5f26f2673a5099da600c8c66 Mon Sep 17 00:00:00 2001 From: Richard McDaniel Date: Fri, 10 Nov 2023 01:37:27 +0000 Subject: [PATCH] Cleanup --- src/WorkflowStub.php | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/WorkflowStub.php b/src/WorkflowStub.php index bfadf97..e42f4f4 100644 --- a/src/WorkflowStub.php +++ b/src/WorkflowStub.php @@ -63,8 +63,8 @@ public function __call($method, $arguments) $this->storedWorkflow->toWorkflow(); if (static::faked()) { - return $this->fresh() - ->resume(); + $this->resume(); + return; } return Signal::dispatch($this->storedWorkflow, self::connection(), self::queue()); @@ -321,17 +321,11 @@ private function dispatch(): void $this->storedWorkflow->status->transitionTo(WorkflowPendingStatus::class); - if (static::faked()) { - $method = version_compare(App::version(), '10', '>=') ? 'dispatchSync' : 'dispatchNow'; - $this->storedWorkflow->class::$method( - $this->storedWorkflow, - ...Y::unserialize($this->storedWorkflow->arguments) - ); - } else { - $this->storedWorkflow->class::dispatch( - $this->storedWorkflow, - ...Y::unserialize($this->storedWorkflow->arguments) - ); - } + $dispatch = static::faked() ? 'dispatchSync' : 'dispatch'; + + $this->storedWorkflow->class::$dispatch( + $this->storedWorkflow, + ...Y::unserialize($this->storedWorkflow->arguments) + ); } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy