Skip to content

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Mar 30, 2024
1 parent a386f4e commit 04b29ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ public static function rows(
bool $preserveKey = false,
?int $limit = null
): array {
$rows = [];
$newKey = 0;
$total = 0;
$rows = [];
$newKey = 0;
$totalFound = 0;

foreach ($data as $key => $datum) {
$isFound = $filter($datum, $key);
Expand All @@ -156,8 +156,8 @@ public static function rows(
continue;
}

++$total;
if ($total === $limit) {
++$totalFound;
if ($totalFound === $limit) {
break;
}
}
Expand Down

0 comments on commit 04b29ef

Please sign in to comment.