From 8b59683ea57f122729b95ce8ae18bb5b7a9ef4aa Mon Sep 17 00:00:00 2001 From: Julian Wood Date: Fri, 9 Jun 2017 18:32:30 -0600 Subject: [PATCH] If array is empty, should return false How can the array possibly match the closure if it is empty? Has to return false. --- src/Methods/ArraysMethods.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Methods/ArraysMethods.php b/src/Methods/ArraysMethods.php index b75f5f8..3962830 100644 --- a/src/Methods/ArraysMethods.php +++ b/src/Methods/ArraysMethods.php @@ -116,7 +116,7 @@ public static function matchesAny($array, Closure $closure) // Check the results if (count($array) === 0) { - return true; + return false; } $array = array_search(true, $array, false);