We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a386f4e commit 04b29efCopy full SHA for 04b29ef
src/Finder.php
@@ -129,9 +129,9 @@ public static function rows(
129
bool $preserveKey = false,
130
?int $limit = null
131
): array {
132
- $rows = [];
133
- $newKey = 0;
134
- $total = 0;
+ $rows = [];
+ $newKey = 0;
+ $totalFound = 0;
135
136
foreach ($data as $key => $datum) {
137
$isFound = $filter($datum, $key);
@@ -156,8 +156,8 @@ public static function rows(
156
continue;
157
}
158
159
- ++$total;
160
- if ($total === $limit) {
+ ++$totalFound;
+ if ($totalFound === $limit) {
161
break;
162
163
0 commit comments