1 | <?php |
||
5 | abstract class PaginatedListResource extends ListResource |
||
6 | { |
||
7 | /** @var bool */ |
||
8 | protected $autoPagination = false; |
||
9 | |||
10 | /** |
||
11 | * @return bool |
||
12 | */ |
||
13 | public function getAutoPagination() |
||
17 | |||
18 | /** |
||
19 | * @param bool $autoPagination |
||
20 | * |
||
21 | * @return $this |
||
22 | */ |
||
23 | public function setAutoPagination($autoPagination) |
||
29 | |||
30 | /** |
||
31 | * @param int $page |
||
32 | * @param array $query |
||
33 | * |
||
34 | * @return Page |
||
|
|||
35 | */ |
||
36 | public function getPage($page = 1, array $query = []) |
||
44 | |||
45 | /** {@inheritdoc} */ |
||
46 | protected function postAll(array $data) |
||
67 | |||
68 | /** {@inheritdoc} */ |
||
69 | public function count() |
||
75 | |||
76 | /** |
||
77 | * @param int $page |
||
78 | * @param array $query |
||
79 | * |
||
80 | * @return AutoPagingIterator|PagingIterator |
||
81 | */ |
||
82 | public function getIterator($page = 1, array $query = []) |
||
88 | } |
||
89 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.