Skip to content

Commit

Permalink
Merge pull request #728 from stripe/ob-fix-727
Browse files Browse the repository at this point in the history
Clean up Collection
  • Loading branch information
ob-stripe authored Sep 5, 2019
2 parents 765e26b + bfab7fa commit 1ab47a3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,23 @@ public static function baseUrl()
/**
* Returns the filters.
*
* @param array $filters The filters.
* @return array The filters.
*/
public function getFilters($filters)
public function getFilters()
{
return $this->filters;
}

/**
* Sets the filters.
* Sets the filters, removing paging options.
*
* @return array The filters.
* @param array $filters The filters.
*/
public function setFilters($filters)
{
$this->filters = $filters;
unset($this->filters['starting_after']);
unset($this->filters['ending_before']);
}

public function offsetGet($k)
Expand Down Expand Up @@ -120,7 +122,6 @@ public function getIterator()
public function autoPagingIterator()
{
$page = $this;
$params = $this->_requestParams;

while (true) {
foreach ($page as $item) {
Expand Down

0 comments on commit 1ab47a3

Please sign in to comment.