Skip to content

Commit b243cd0

Browse files
committed
Use multiple catch
1 parent 9b10c04 commit b243cd0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/php/lang/reflection/Method.class.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,7 @@ public function invoke($instance, $args= [], $context= null) {
6363
try {
6464
$pass= PHP_VERSION_ID < 80000 && $args ? self::pass($this->reflect, $args) : $args;
6565
return $this->reflect->invokeArgs($instance, $pass);
66-
} catch (ReflectionException $e) {
67-
throw new CannotInvoke($this, $e);
68-
} catch (ArgumentCountError $e) {
69-
throw new CannotInvoke($this, $e);
70-
} catch (TypeError $e) {
66+
} catch (ReflectionException | ArgumentCountError | TypeError $e) {
7167
throw new CannotInvoke($this, $e);
7268
} catch (Throwable $e) {
7369

0 commit comments

Comments
 (0)