Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added @throws to autoPagingIterator #1682

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading