Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on Feb 14, 2013
@hype- hype- Fixed key providing to ArrayCollection::map. ccf2f4f
Commits on Feb 19, 2013
@Ezku Ezku Merge pull request #10 from xi-project/fix-keys-for-map
Fixed key providing to ArrayCollection::map
c9e51a5
View
2 library/Xi/Collections/Collection/ArrayCollection.php
@@ -123,7 +123,7 @@ public function map($callback)
private function addKeyArgument($callback)
{
$values = $this->elements;
- return function($value) use($callback, $values) {
+ return function($value) use($callback, &$values) {
list($key) = each($values);
return $callback($value, $key);
};
View
1 tests/Xi/Collections/Collection/AbstractCollectionTest.php
@@ -145,6 +145,7 @@ public function keyMapSet()
{
return array(
array(array('foo' => null), array('foo' => 'foo')),
+ array(array('min' => 1, 'max' => 3), array('min' => 'min', 'max' => 'max')),
);
}

No commit comments for this range

Something went wrong with that request. Please try again.