Skip to content

Commit dbe8938

Browse files
committed
Leverage non-capturing catches
1 parent 071e847 commit dbe8938

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Crawler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,11 +1076,11 @@ private function convertToHtmlEntities(string $htmlContent, string $charset = 'U
10761076

10771077
try {
10781078
return mb_encode_numericentity($htmlContent, [0x80, 0xFFFF, 0, 0xFFFF], $charset);
1079-
} catch (\Exception|\ValueError $e) {
1079+
} catch (\Exception|\ValueError) {
10801080
try {
10811081
$htmlContent = iconv($charset, 'UTF-8', $htmlContent);
10821082
$htmlContent = mb_encode_numericentity($htmlContent, [0x80, 0xFFFF, 0, 0xFFFF], 'UTF-8');
1083-
} catch (\Exception|\ValueError $e) {
1083+
} catch (\Exception|\ValueError) {
10841084
}
10851085

10861086
return $htmlContent;

FormFieldRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function has(string $name): bool
9393
$this->get($name);
9494

9595
return true;
96-
} catch (\InvalidArgumentException $e) {
96+
} catch (\InvalidArgumentException) {
9797
return false;
9898
}
9999
}

0 commit comments

Comments
 (0)