| @@ -4,26 +4,26 @@ | ||
| 4 | 4 | class Pagination { |
| 5 | 5 | /** |
| 6 | 6 | * @var int $start Index of the first element of the current dataset, relative to the total dataset; >= 1 |
| 7 | 7 | */ |
| 8 | - public $start; | |
| 8 | + public int $start = -1; | |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * @var int $end Index of the last element of the current dataset, relative to the total dataset; <= $total |
| 12 | 12 | */ |
| 13 | - public $end; | |
| 13 | + public int $end = -1; | |
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | - * @var int $total Total number of elements in the current dataset | |
| 16 | + * @var int $total Total number of elements in the current dataset. A value greater than -1 implies that the platform has set the total. | |
| 17 | 17 | */ |
| 18 | - public $total; | |
| 18 | + public int $total = -1; | |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * @var int $per_page Items attempted to fetch for the current dataset; $per_page >= $end - $start + 1 |
| 22 | 22 | */ |
| 23 | - public $per_page; | |
| 23 | + public int $per_page = 500; | |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * @var string $next_token Token to fetch next data set; some platforms use this instead of defining hard counts |
| 27 | 27 | */ |
| 28 | - public $next_token; | |
| 28 | + public string $next_token = ''; | |
| 29 | 29 | } |