From 2692601a73e5182c6c7a9af5aea07d5f7de50490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Thu, 26 Dec 2024 18:24:39 +0100 Subject: [PATCH] [rector] Apply RemoveUnusedVariableInCatch rule --- Player/VariableResolver.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Player/VariableResolver.php b/Player/VariableResolver.php index 62b75e34..0a29eed6 100644 --- a/Player/VariableResolver.php +++ b/Player/VariableResolver.php @@ -28,7 +28,6 @@ public function resolve(array $toResolve = [], array $variables = []): array { $resolved = []; while ($toResolve) { - $lastException = null; $succeed = false; foreach ($toResolve as $key => $value) { try { @@ -44,7 +43,7 @@ public function resolve(array $toResolve = [], array $variables = []): array } } - if (false === $succeed && $lastException) { + if (false === $succeed && isset($lastException)) { throw $lastException; } }