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) + ); } }
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: