Skip to content

Commit 1eaf65e

Browse files
authored
feat(support): rename map_array to map_iterable (#1071)
1 parent 283af0b commit 1eaf65e

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
@@ -469,7 +469,7 @@ public function each(Closure $each): static
469469
*/
470470
public function map(Closure $map): static
471471
{
472-
return $this->createOrModify(namespace\map_array($this->value, $map));
472+
return $this->createOrModify(namespace\map_iterable($this->value, $map));
473473
}
474474

475475
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ function each(iterable $array, Closure $each): array
679679
*
680680
* @return array<TKey, TMapValue>
681681
*/
682-
function map_array(iterable $array, Closure $map): array
682+
function map_iterable(iterable $array, Closure $map): array
683683
{
684684
$result = [];
685685

@@ -1013,7 +1013,7 @@ function group_by(iterable $array, Closure $keyExtracor): array
10131013
*/
10141014
function flat_map(iterable $array, Closure $map, int|float $depth = 1): array
10151015
{
1016-
return namespace\flatten(namespace\map_array(to_array($array), $map), $depth);
1016+
return namespace\flatten(namespace\map_iterable(to_array($array), $map), $depth);
10171017
}
10181018

10191019
/**

0 commit comments

Comments
 (0)