Skip to content

Commit 51dc620

Browse files
authored
refactor(support): rename map to map_array (#1045)
1 parent 798d0f4 commit 51dc620

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Tempest/Support/src/Arr/ManipulatesArray.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ public function each(Closure $each): static
458458
*/
459459
public function map(Closure $map): static
460460
{
461-
return $this->createOrModify(namespace\map($this->value, $map));
461+
return $this->createOrModify(namespace\map_array($this->value, $map));
462462
}
463463

464464
/**

src/Tempest/Support/src/Arr/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ function each(iterable $array, Closure $each): array
657657
*
658658
* @return array<TKey, TMapValue>
659659
*/
660-
function map(iterable $array, Closure $map): array
660+
function map_array(iterable $array, Closure $map): array
661661
{
662662
$result = [];
663663

@@ -946,7 +946,7 @@ function flatten(iterable $array, int|float $depth = INF): array
946946
*/
947947
function flat_map(iterable $array, Closure $map, int|float $depth = 1): array
948948
{
949-
return namespace\flatten(namespace\map(to_array($array), $map), $depth);
949+
return namespace\flatten(namespace\map_array(to_array($array), $map), $depth);
950950
}
951951

952952
/**

0 commit comments

Comments
 (0)