mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
revert to first approach by calling __call directly
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user