Skip to content

Commit

Permalink
fix array_reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jan 7, 2023
1 parent ee2bfc0 commit 2689408
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Webmozart\Assert\Assert;

use function rsort;
use function array_reverse;

final class Finder
{
Expand Down Expand Up @@ -35,7 +35,7 @@ public static function last(array $data, callable $callable): mixed
private static function locateFirst(array $data, callable $callable, bool $flip = false): mixed
{
if ($flip) {
array_reverse($data);
$data = array_reverse($data);
}

foreach ($data as $datum) {
Expand Down

0 comments on commit 2689408

Please sign in to comment.