From fac44d9afee034049507fcd7c3542f2501d5ca5d Mon Sep 17 00:00:00 2001 From: Tom Witkowski Date: Sun, 21 Jun 2020 18:46:11 +0200 Subject: [PATCH] revert to first approach by calling __call directly --- src/Support/Reflection.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Support/Reflection.php b/src/Support/Reflection.php index 8b8e73ae..44805ba2 100644 --- a/src/Support/Reflection.php +++ b/src/Support/Reflection.php @@ -34,11 +34,8 @@ final class Reflection return $reflectionMethod->invoke($object, ...$args); } catch (ReflectionException $exception) { - if ( - method_exists($object, '__call') - || method_exists($object, '__callStatic') - ) { - return $object->{$method}(...$args); + if (method_exists($object, '__call')) { + return $object->__call($method, $args); } throw $exception;