Skip to content

Commit f68f5a9

Browse files
committed
make limit nullable
1 parent fb7e50c commit f68f5a9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Finder.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public static function rows(
129129
iterable $data,
130130
callable $filter,
131131
bool $preserveKey = false,
132-
int $limit = PHP_INT_MAX
132+
?int $limit = null
133133
): array {
134134
$rows = [];
135135
$newKey = 0;
@@ -154,6 +154,10 @@ public static function rows(
154154

155155
$rows[$rowKey] = $datum;
156156

157+
if ($limit === null) {
158+
continue;
159+
}
160+
157161
++$total;
158162
if ($total === $limit) {
159163
break;

0 commit comments

Comments
 (0)