@@ -21,13 +21,17 @@ |
||
21 | 21 | do { |
22 | 22 | $response = self::getPaginatedResponse($callback, $params); |
23 | 23 | $items = self::getDataFromPaginatedResponse($response); |
24 | - if (empty($items)) return; |
|
24 | + if (empty($items)) { |
|
25 | + return; |
|
26 | + } |
|
25 | 27 | |
26 | 28 | $batchesNum++; |
27 | 29 | yield $items; |
28 | 30 | |
29 | 31 | $params['bookmarks'] = self::getBookMarks($response); |
30 | - if ($this->checkEndBookMarks($params['bookmarks'])) return; |
|
32 | + if ($this->checkEndBookMarks($params['bookmarks'])) { |
|
33 | + return; |
|
34 | + } |
|
31 | 35 | |
32 | 36 | } while ( ! self::reachBatchesLimit($batchesLimit, $batchesNum)); |
33 | 37 | } |