Skip to content

Commit

Permalink
Minor change in the First transform operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Sep 9, 2019
1 parent 994772c commit b8a7556
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Transformation/First.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public function on(iterable $collection)
$default = $this->default;

if (null === $callback) {
$callback = static function ($v, $k) {
$callback = static function ($value, $key) {
return true;
};
}

foreach ($collection as $key => $value) {
if ($callback($value, $key)) {
if (true === $callback($value, $key)) {
return $value;
}
}
Expand Down

0 comments on commit b8a7556

Please sign in to comment.