From 42fa10990c6d51d667db9f8f86ce2b684e229a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20=C3=96zsen?= Date: Fri, 1 May 2020 02:18:02 +0400 Subject: [PATCH] #181 - add missing break in scalar matching loop, to advance to next paramInfo element on finding a match --- Dice.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Dice.php b/Dice.php index b75299b..dbd0336 100644 --- a/Dice.php +++ b/Dice.php @@ -248,6 +248,7 @@ private function getParams(\ReflectionMethod $method, array $rule) { for ($i = 0; $i < count($args); $i++) { if (call_user_func('is_' . $param->getType()->getName(), $args[$i])) { $parameters[] = array_splice($args, $i, 1)[0]; + break; } } }