From 8a1ab83e2a6b25394fa648d7262a14c11c8b4e15 Mon Sep 17 00:00:00 2001 From: Prathmesh Ranaut Date: Thu, 18 Apr 2024 15:43:24 -0400 Subject: [PATCH] Added @throws to autoPagingIterator --- lib/Collection.php | 6 ++++++ lib/SearchResult.php | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/lib/Collection.php b/lib/Collection.php index 67da085d3..bd8d7db80 100644 --- a/lib/Collection.php +++ b/lib/Collection.php @@ -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 @@ -228,6 +230,8 @@ public function isEmpty() * @param null|array $params * @param null|array|string $opts * + * @throws Exception\ApiErrorException + * * @return Collection */ public function nextPage($params = null, $opts = null) @@ -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 */ public function previousPage($params = null, $opts = null) diff --git a/lib/SearchResult.php b/lib/SearchResult.php index b60053146..fc3e46167 100644 --- a/lib/SearchResult.php +++ b/lib/SearchResult.php @@ -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 @@ -179,6 +181,8 @@ public function isEmpty() * @param null|array $params * @param null|array|string $opts * + * @throws Exception\ApiErrorException + * * @return SearchResult */ public function nextPage($params = null, $opts = null)