Skip to content

Commit

Permalink
compatibility with 5.3 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Magomogo committed Sep 26, 2013
1 parent 9166160 commit 7e70c12
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/Magomogo/Persisted/Collection/AbstractCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@ public function getIterator()
*/
public function allModels()
{
$collection = $this;
return array_map(
function($properties) use ($collection) {
return $collection->constructModel($properties);
},
$this->items
);
$models = array();
foreach ($this->items as $offset => $properties) {
$models[$offset] = $this->constructModel($properties);
}
return $models;
}

public function allProperties()
Expand Down

0 comments on commit 7e70c12

Please sign in to comment.