Skip to content

Commit 54f36c1

Browse files
committed
Leverage non-capturing catches
1 parent 2245c22 commit 54f36c1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Loader/AnnotationDirectoryLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function supports(mixed $resource, string $type = null): bool
7979

8080
try {
8181
return is_dir($this->locator->locate($resource));
82-
} catch (\Exception $e) {
82+
} catch (\Exception) {
8383
return false;
8484
}
8585
}

Matcher/RedirectableUrlMatcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function match(string $pathinfo): array
3939
$ret = parent::match($pathinfo);
4040

4141
return $this->redirect($pathinfo, $ret['_route'] ?? null, $this->context->getScheme()) + $ret;
42-
} catch (ExceptionInterface $e2) {
42+
} catch (ExceptionInterface) {
4343
throw $e;
4444
} finally {
4545
$this->context->setScheme($scheme);
@@ -52,7 +52,7 @@ public function match(string $pathinfo): array
5252
$ret = parent::match($pathinfo);
5353

5454
return $this->redirect($pathinfo, $ret['_route'] ?? null) + $ret;
55-
} catch (ExceptionInterface $e2) {
55+
} catch (ExceptionInterface) {
5656
if ($this->allowSchemes) {
5757
goto redirect_scheme;
5858
}

Matcher/TraceableUrlMatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function getTraces(string $pathinfo)
3535

3636
try {
3737
$this->match($pathinfo);
38-
} catch (ExceptionInterface $e) {
38+
} catch (ExceptionInterface) {
3939
}
4040

4141
return $this->traces;

0 commit comments

Comments
 (0)