From b27bde5890d10d0ea87b4107329ec8eac816f6b0 Mon Sep 17 00:00:00 2001 From: Ali Khosrojerdi Date: Fri, 31 Oct 2025 16:49:29 +0330 Subject: [PATCH] refactor: remove un use var --- src/Illuminate/Support/Testing/Fakes/ExceptionHandlerFake.php | 2 +- tests/Foundation/FoundationHelpersTest.php | 2 +- tests/Integration/Database/SchemaBuilderSchemaNameTest.php | 2 +- tests/Integration/Events/ShouldDispatchAfterCommitEventTest.php | 2 +- tests/Queue/QueueSyncQueueTest.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Illuminate/Support/Testing/Fakes/ExceptionHandlerFake.php b/src/Illuminate/Support/Testing/Fakes/ExceptionHandlerFake.php index 4b94b5c59814..bbf5f29b4ddb 100644 --- a/src/Illuminate/Support/Testing/Fakes/ExceptionHandlerFake.php +++ b/src/Illuminate/Support/Testing/Fakes/ExceptionHandlerFake.php @@ -113,7 +113,7 @@ public function assertNotReported(Closure|string $exception) { try { $this->assertReported($exception); - } catch (ExpectationFailedException $e) { + } catch (ExpectationFailedException) { return; } diff --git a/tests/Foundation/FoundationHelpersTest.php b/tests/Foundation/FoundationHelpersTest.php index 26c43d9a3708..3a180bb0c15f 100644 --- a/tests/Foundation/FoundationHelpersTest.php +++ b/tests/Foundation/FoundationHelpersTest.php @@ -290,7 +290,7 @@ public function toResponse($request) $this->fail( sprintf('abort function must throw %s when receiving code as Responable implementation.', HttpResponseException::class) ); - } catch (HttpResponseException $ex) { + } catch (HttpResponseException) { $this->assertSame($request, $code->request); } } diff --git a/tests/Integration/Database/SchemaBuilderSchemaNameTest.php b/tests/Integration/Database/SchemaBuilderSchemaNameTest.php index 93bd151f4b1b..c2ec3e57c392 100644 --- a/tests/Integration/Database/SchemaBuilderSchemaNameTest.php +++ b/tests/Integration/Database/SchemaBuilderSchemaNameTest.php @@ -566,7 +566,7 @@ public function testHasTable($connection) try { $db->statement("create login my_user with password = 'Passw0rd'"); $db->statement('create user my_user for login my_user'); - } catch(\Illuminate\Database\QueryException $e) { + } catch(\Illuminate\Database\QueryException) { // } diff --git a/tests/Integration/Events/ShouldDispatchAfterCommitEventTest.php b/tests/Integration/Events/ShouldDispatchAfterCommitEventTest.php index bfc1da3bbe1a..bb3a33a70e19 100644 --- a/tests/Integration/Events/ShouldDispatchAfterCommitEventTest.php +++ b/tests/Integration/Events/ShouldDispatchAfterCommitEventTest.php @@ -160,7 +160,7 @@ public function testChildEventsAreNotDispatchedIfParentTransactionFails() throw new \Exception; }); - } catch (\Exception $e) { + } catch (\Exception) { // } diff --git a/tests/Queue/QueueSyncQueueTest.php b/tests/Queue/QueueSyncQueueTest.php index 901f66c2d75e..0fbe30585416 100755 --- a/tests/Queue/QueueSyncQueueTest.php +++ b/tests/Queue/QueueSyncQueueTest.php @@ -78,7 +78,7 @@ public function testFailedJobHasAccessToJobInstance() try { $sync->push(new FailingSyncQueueJob()); - } catch (LogicException $e) { + } catch (LogicException) { $this->assertSame('extraValue', $_SERVER['__sync.failed']); } }