Skip to content

Commit ae79bf0

Browse files
Clean Arr (#49530)
1 parent a40c658 commit ae79bf0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Illuminate/Collections/Arr.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,7 @@ public static function keyBy($array, $keyBy)
476476
*/
477477
public static function prependKeysWith($array, $prependWith)
478478
{
479-
return Collection::make($array)->mapWithKeys(function ($item, $key) use ($prependWith) {
480-
return [$prependWith.$key => $item];
481-
})->all();
479+
return static::mapWithKeys($array, fn ($item, $key) => [$prependWith.$key => $item]);
482480
}
483481

484482
/**

0 commit comments

Comments
 (0)