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 8d85481
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 @@ -229,6 +231,8 @@ public function isEmpty()
* @param null|array|string $opts
*
* @return Collection<TStripeObject>
*
* @throws Exception\ApiErrorException
*/
public function nextPage($params = null, $opts = null)
{
Expand Down Expand Up @@ -257,6 +261,8 @@ public function nextPage($params = null, $opts = null)
* @param null|array|string $opts
*
* @return Collection<TStripeObject>
*
* @throws Exception\ApiErrorException
*/
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 @@ -128,6 +128,8 @@ public function getIterator()
* iterate across all objects across all pages. As page boundaries are
* encountered, the next page will be fetched automatically for
* continued iteration.
*
* @throws Exception\ApiErrorException
*/
public function autoPagingIterator()
{
Expand Down Expand Up @@ -180,6 +182,8 @@ public function isEmpty()
* @param null|array|string $opts
*
* @return SearchResult<TStripeObject>
*
* @throws Exception\ApiErrorException
*/
public function nextPage($params = null, $opts = null)
{
Expand Down

0 comments on commit 8d85481

Please sign in to comment.