From 8404a47d4e8feb6f7a99fd46d2567ad410ceea29 Mon Sep 17 00:00:00 2001 From: Nathanael Esayeas Date: Wed, 28 Feb 2024 16:47:48 -0600 Subject: [PATCH] Update ClosureWrapper.php Signed-off-by: Nathanael Esayeas --- library/Mockery/ClosureWrapper.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/library/Mockery/ClosureWrapper.php b/library/Mockery/ClosureWrapper.php index 6dc283a80..39658fb68 100644 --- a/library/Mockery/ClosureWrapper.php +++ b/library/Mockery/ClosureWrapper.php @@ -10,7 +10,7 @@ namespace Mockery; -use Mockery\Matcher\Closure; +use Closure; /** * @internal @@ -19,13 +19,16 @@ class ClosureWrapper { private $closure; - public function __construct(\Closure $closure) + public function __construct(Closure $closure) { $this->closure = $closure; } + /** + * @return mixed + */ public function __invoke() { - return call_user_func_array($this->closure, func_get_args()); + return ($this->closure)(...func_get_args()); } }