Skip to content

Commit

Permalink
Added @throws to autoPagingIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
prathmesh-stripe committed Apr 18, 2024
1 parent 6b77ba6 commit 8a1ab83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ public function getReverseIterator()
}

/**
* @throws Exception\ApiErrorException
*
* @return \Generator|TStripeObject[] A generator that can be used to
* iterate across all objects across all pages. As page boundaries are
* encountered, the next page will be fetched automatically for
Expand Down Expand Up @@ -228,6 +230,8 @@ public function isEmpty()
* @param null|array $params
* @param null|array|string $opts
*
* @throws Exception\ApiErrorException
*
* @return Collection<TStripeObject>
*/
public function nextPage($params = null, $opts = null)
Expand Down Expand Up @@ -256,6 +260,8 @@ public function nextPage($params = null, $opts = null)
* @param null|array $params
* @param null|array|string $opts
*
* @throws Exception\ApiErrorException
*
* @return Collection<TStripeObject>
*/
public function previousPage($params = null, $opts = null)
Expand Down
4 changes: 4 additions & 0 deletions lib/SearchResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ public function getIterator()
}

/**
* @throws Exception\ApiErrorException
*
* @return \Generator|TStripeObject[] A generator that can be used to
* iterate across all objects across all pages. As page boundaries are
* encountered, the next page will be fetched automatically for
Expand Down Expand Up @@ -179,6 +181,8 @@ public function isEmpty()
* @param null|array $params
* @param null|array|string $opts
*
* @throws Exception\ApiErrorException
*
* @return SearchResult<TStripeObject>
*/
public function nextPage($params = null, $opts = null)
Expand Down

0 comments on commit 8a1ab83

Please sign in to comment.