Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
Make sure the amount of pages is always retrieved by rounding up
Browse files Browse the repository at this point in the history
  • Loading branch information
Spoel committed Oct 2, 2019
1 parent db60a89 commit c240918
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function all() : Collection
$results = $query->results;

if ($query->total_results_size > $query->results_size) {
$pagesAmount = round($query->total_results_size / $query->results_size);
$pagesAmount = ceil($query->total_results_size / $query->results_size);

foreach (range(2, $pagesAmount) as $number) {
$results = array_merge($results, $this->pagerQuery(intval($number)));
Expand Down

0 comments on commit c240918

Please sign in to comment.