@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function searchCall($query, $scope, $bookmarks = []) |
26 | 26 | { |
27 | - $url = UrlHelper::getSearchUrl(! empty($bookmarks)); |
|
27 | + $url = UrlHelper::getSearchUrl( ! empty($bookmarks)); |
|
28 | 28 | $get = $this->createSearchRequest($query, $scope, $bookmarks); |
29 | 29 | $url = $url.'?'.UrlHelper::buildRequestString($get); |
30 | 30 | $response = $this->request->exec($url); |
@@ -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 | } |