Skip to content

Commit e61c61c

Browse files
committed
avoid elseif
1 parent 099b1f6 commit e61c61c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/Finder.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,17 @@ public static function partition(
196196
$matching[$matchKey] = $datum;
197197
++$matchKey;
198198
}
199-
} elseif ($preserveKey || ! is_numeric($key)) {
199+
200+
continue;
201+
}
202+
203+
if ($preserveKey || ! is_numeric($key)) {
200204
$notMatching[$key] = $datum;
201-
} else {
202-
$notMatching[$notMatchKey] = $datum;
203-
++$notMatchKey;
205+
continue;
204206
}
207+
208+
$notMatching[$notMatchKey] = $datum;
209+
++$notMatchKey;
205210
}
206211

207212
return [$matching, $notMatching];

0 commit comments

Comments
 (0)