Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Commit

Permalink
Adding keys to map function
Browse files Browse the repository at this point in the history
  • Loading branch information
italolelis committed Oct 27, 2014
1 parent 99de636 commit 8098b5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CollectionArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function map($p)
throw new InvalidArgumentException('The parameter must be a callable');
}

return static::fromArray(array_map($p, $this->array));
return static::fromArray(array_map($p, $this->array, array_keys($this->array)));
}

/**
Expand Down

0 comments on commit 8098b5f

Please sign in to comment.