Skip to content

Commit

Permalink
[rector] Apply RemoveUnusedVariableInCatch rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jderusse committed Dec 27, 2024
1 parent 8b98f1c commit 2692601
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Player/VariableResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -44,7 +43,7 @@ public function resolve(array $toResolve = [], array $variables = []): array
}
}

if (false === $succeed && $lastException) {
if (false === $succeed && isset($lastException)) {
throw $lastException;
}
}
Expand Down

0 comments on commit 2692601

Please sign in to comment.