Skip to content

Commit

Permalink
Update Map operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jul 22, 2020
1 parent e20bd8e commit 106fbfe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/loophp/collection/CollectionSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ public function it_can_map(): void
->map(static function (string $item): string {
return $item . $item;
})
->shouldIterateAs([0 => 'AA', 1 => 'BB', 2 => 'CC', 3 => 'DD', 4 => 'EE']);
->shouldIterateAs(['A' => 'AA', 'B' => 'BB', 'C' => 'CC', 'D' => 'DD', 'E' => 'EE']);
}

public function it_can_merge(): void
Expand Down
2 changes: 1 addition & 1 deletion src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public function loop(): BaseInterface

public function map(callable ...$callbacks): BaseInterface
{
return $this->run(new Walk(...$callbacks), new Normalize());
return $this->run(new Walk(...$callbacks));
}

public function merge(iterable ...$sources): BaseInterface
Expand Down

0 comments on commit 106fbfe

Please sign in to comment.