revert to first approach by calling __call directly

This commit is contained in:
Tom Witkowski
2020-06-21 18:46:11 +02:00
parent 6e27c6d85d
commit fac44d9afe

View File

@ -34,11 +34,8 @@ final class Reflection
return $reflectionMethod->invoke($object, ...$args); return $reflectionMethod->invoke($object, ...$args);
} catch (ReflectionException $exception) { } catch (ReflectionException $exception) {
if ( if (method_exists($object, '__call')) {
method_exists($object, '__call') return $object->__call($method, $args);
|| method_exists($object, '__callStatic')
) {
return $object->{$method}(...$args);
} }
throw $exception; throw $exception;