Skip to content

Commit bf3092a

Browse files
committed
Merge remote-tracking branch 'upstream/8.x' into 8.x
2 parents 5d74672 + fd0864a commit bf3092a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Illuminate/Collections/Traits/EnumeratesValues.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -753,13 +753,7 @@ public function reduce(callable $callback, $initial = null)
753753
*/
754754
public function reduceWithKeys(callable $callback, $initial = null)
755755
{
756-
$result = $initial;
757-
758-
foreach ($this as $key => $value) {
759-
$result = $callback($result, $value, $key);
760-
}
761-
762-
return $result;
756+
return $this->reduce($callback, $initial);
763757
}
764758

765759
/**

0 commit comments

Comments
 (0)