From b8a7556746e2ac84d9fa8eabf11abea52e58c731 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Mon, 9 Sep 2019 16:08:52 +0200 Subject: [PATCH] Minor change in the First transform operation. --- src/Transformation/First.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Transformation/First.php b/src/Transformation/First.php index 24fb9ea38..93ba831ef 100644 --- a/src/Transformation/First.php +++ b/src/Transformation/First.php @@ -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; } }