Skip to content

Commit d30f4b1

Browse files
committed
Leverage non-capturing catches
1 parent a07ffe7 commit d30f4b1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Inline.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ private static function parseSequence(string $sequence, int $flags, int &$i = 0,
370370
try {
371371
$pos = 0;
372372
$value = self::parseMapping('{'.$value.'}', $flags, $pos, $references);
373-
} catch (\InvalidArgumentException $e) {
373+
} catch (\InvalidArgumentException) {
374374
// no, it's not
375375
}
376376
}
@@ -675,7 +675,7 @@ private static function evaluateScalar(string $scalar, int $flags, array &$refer
675675
if (false !== $scalar = $time->getTimestamp()) {
676676
return $scalar;
677677
}
678-
} catch (\ValueError $e) {
678+
} catch (\ValueError) {
679679
// no-op
680680
}
681681

Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ private function doParse(string $value, int $flags)
475475

476476
try {
477477
return Inline::parse(trim($value));
478-
} catch (ParseException $e) {
478+
} catch (ParseException) {
479479
// fall-through to the ParseException thrown below
480480
}
481481
}

0 commit comments

Comments
 (0)