From 26f7ff42c67e7f2e1769da694865c0fabe33a01d Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Mon, 21 Aug 2023 13:30:58 +1000 Subject: [PATCH] wip --- src/Pulse.php | 4 ++-- tests/Feature/HandleExceptionTest.php | 11 ++++------- tests/Feature/HandleQueryTest.php | 9 ++++----- tests/Pest.php | 3 ++- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/Pulse.php b/src/Pulse.php index a72e74de..42cf6f44 100644 --- a/src/Pulse.php +++ b/src/Pulse.php @@ -84,9 +84,9 @@ public function __construct( */ public function ignore($callback): mixed { - $recording = $this->shouldRecord; + $recording = $this->shouldRecord; - $this->shouldRecord = false; + $this->shouldRecord = false; try { return $callback(); diff --git a/tests/Feature/HandleExceptionTest.php b/tests/Feature/HandleExceptionTest.php index 56a358b0..ddfd2b53 100644 --- a/tests/Feature/HandleExceptionTest.php +++ b/tests/Feature/HandleExceptionTest.php @@ -1,10 +1,8 @@ 'db']); - Auth::extend('db', fn () => new class implements Guard { + Auth::extend('db', fn () => new class implements Guard + { use GuardHelpers; public function validate(array $credentials = []) @@ -119,7 +115,8 @@ public function user() Facade::clearResolvedInstance(PulseInstance::class); App::when(HandleException::class) ->needs(AuthManager::class) - ->give(fn (Application $app) => new class($app) extends AuthManager { + ->give(fn (Application $app) => new class($app) extends AuthManager + { public function hasUser() { throw new RuntimeException('Error checking for user.'); diff --git a/tests/Feature/HandleQueryTest.php b/tests/Feature/HandleQueryTest.php index 1d924000..02c0be89 100644 --- a/tests/Feature/HandleQueryTest.php +++ b/tests/Feature/HandleQueryTest.php @@ -1,6 +1,5 @@ 'db']); - Auth::extend('db', fn () => new class implements Guard { + Auth::extend('db', fn () => new class implements Guard + { use GuardHelpers; public function validate(array $credentials = []) @@ -158,7 +156,8 @@ public function user() Facade::clearResolvedInstance(PulseInstance::class); App::when(HandleQuery::class) ->needs(AuthManager::class) - ->give(fn (Application $app) => new class($app) extends AuthManager { + ->give(fn (Application $app) => new class($app) extends AuthManager + { public function hasUser() { throw new RuntimeException('Error checking for user.'); diff --git a/tests/Pest.php b/tests/Pest.php index 46658c42..a7722e84 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -52,7 +52,8 @@ | */ -function prependListener(string $event, callable $listener): void { +function prependListener(string $event, callable $listener): void +{ $listeners = Event::getRawListeners()[$event]; Event::forget($event);