Skip to content

Commit b557e47

Browse files
rkrxpierredup
authored andcommitted
Use of is_iterable instead of is_array($source) || $source instanceof Traversable
1 parent 534a89f commit b557e47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/internal/baseMatches.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function baseMatches($source): callable
2121
return true;
2222
}
2323

24-
if (\is_array($source) || $source instanceof \Traversable) {
24+
if (\is_iterable($source)) {
2525
foreach ($source as $k => $v) {
2626
if (!isEqual(property($k)($value, $index, $collection), $v)) {
2727
return false;

0 commit comments

Comments
 (0)