Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Improved IndexedVersions' prev() and end() methods to make sure a ref…
Browse files Browse the repository at this point in the history
…erence is always passed.
  • Loading branch information
gsomoza committed Jul 13, 2015
1 parent 42d29a2 commit 616abd6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Version/Collection/IndexedVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,17 @@ public function addOrReplace(Version $version)
*/
public function prev()
{
prev($this->getItems());
$items = &$this->getItems();
prev($items);
}

/**
* Sets the internal items pointer to the end of the array
*/
public function end()
{
end($this->getItems());
$items = &$this->getItems();
end($items);
}

/**
Expand Down

0 comments on commit 616abd6

Please sign in to comment.