From d636ab5fe31eca3c8d008f4085b210fbfe325cf7 Mon Sep 17 00:00:00 2001 From: hackerESQ Date: Fri, 18 Mar 2022 13:44:18 -0500 Subject: [PATCH] fix style --- src/JobPipeline.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/JobPipeline.php b/src/JobPipeline.php index bf53218..526b87c 100644 --- a/src/JobPipeline.php +++ b/src/JobPipeline.php @@ -5,8 +5,9 @@ declare(strict_types=1); namespace Stancl\JobPipeline; use Closure; -use Throwable; use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Support\Facades\Log; +use Throwable; class JobPipeline implements ShouldQueue { @@ -66,9 +67,8 @@ class JobPipeline implements ShouldQueue try { $result = app()->call($job); - } catch(Throwable $exception) { - if ( method_exists(get_class($job[0]), 'failed') ) { - + } catch (Throwable $exception) { + if (method_exists(get_class($job[0]), 'failed')) { call_user_func_array([$job[0], 'failed'], [$exception]); } else { Log::error($exception);