1 | <?php |
||
9 | class Inputs |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | public $pagerKey = '_page'; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | public $limitKey = '_limit'; |
||
20 | |||
21 | /** |
||
22 | * @var int|null |
||
23 | */ |
||
24 | private $total = null; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | private $list = []; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | public $path = ''; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | public $inputs = []; |
||
40 | |||
41 | /** |
||
42 | * @var PaginateInterface |
||
43 | */ |
||
44 | private $paginate; |
||
45 | |||
46 | /** |
||
47 | * @var ToHtmlInterface |
||
48 | */ |
||
49 | private $toHtml; |
||
50 | |||
51 | /** |
||
52 | * |
||
53 | */ |
||
54 | public function __construct() |
||
57 | |||
58 | /** |
||
59 | * get the limit, i.e. number of data per page. |
||
60 | * |
||
61 | * @return int |
||
62 | */ |
||
63 | public function getLimit() |
||
67 | |||
68 | /** |
||
69 | * get the offset for retrieving data. |
||
70 | * |
||
71 | * @return int |
||
72 | */ |
||
73 | public function getOffset() |
||
77 | |||
78 | /** |
||
79 | * get the current page number, starting from 1. |
||
80 | * |
||
81 | * @return int |
||
82 | */ |
||
83 | public function getPage() |
||
87 | |||
88 | /** |
||
89 | * get any key from query. |
||
90 | * |
||
91 | * @param string $key |
||
92 | * @param null|mixed $alt |
||
93 | * @return null|mixed |
||
94 | */ |
||
95 | public function get($key, $alt = null) |
||
101 | |||
102 | /** |
||
103 | * get total number of data. |
||
104 | * - total: number of all the possible data which can be retrieved. |
||
105 | * - count: number of data in the current list. |
||
106 | * |
||
107 | * @return int|null |
||
108 | */ |
||
109 | public function getTotal() |
||
113 | |||
114 | /** |
||
115 | * set the total of data. |
||
116 | * |
||
117 | * @param int|null $total |
||
118 | */ |
||
119 | public function setTotal($total) |
||
123 | |||
124 | /** |
||
125 | * set the data for list. |
||
126 | * |
||
127 | * @param mixed $list |
||
128 | */ |
||
129 | public function setList($list) |
||
133 | |||
134 | /** |
||
135 | * get the data for list. |
||
136 | * |
||
137 | * @return null|array|mixed |
||
138 | */ |
||
139 | public function getList() |
||
143 | |||
144 | /** |
||
145 | * get the count, i.e. number of data in the current list. |
||
146 | * count is the number of data in the current list. |
||
147 | * |
||
148 | * @return int |
||
149 | */ |
||
150 | public function getCount() |
||
157 | |||
158 | /** |
||
159 | * same as getPage() method. |
||
160 | * |
||
161 | * @return int |
||
162 | */ |
||
163 | public function calcSelfPage() |
||
167 | |||
168 | /** |
||
169 | * calculates the first page number, that is 1. |
||
170 | * |
||
171 | * @return int |
||
172 | */ |
||
173 | public function calcFirstPage() |
||
177 | |||
178 | /** |
||
179 | * calculates the last pager number. |
||
180 | * |
||
181 | * @return int |
||
182 | */ |
||
183 | public function calcLastPage() |
||
192 | |||
193 | /** |
||
194 | * calculates the next page number. |
||
195 | * |
||
196 | * @return int |
||
197 | */ |
||
198 | public function calcNextPage() |
||
202 | |||
203 | /** |
||
204 | * check if the next page exists (i.e. current page is not the last page). |
||
205 | * |
||
206 | * @return bool |
||
207 | */ |
||
208 | public function existsNextPage() |
||
212 | |||
213 | /** |
||
214 | * calculates the previous page number. |
||
215 | * |
||
216 | * @return int |
||
217 | */ |
||
218 | public function calcPrevPage() |
||
222 | |||
223 | /** |
||
224 | * @return bool |
||
225 | */ |
||
226 | public function existsPrevPage() |
||
230 | |||
231 | /** |
||
232 | * @param int $numLinks |
||
233 | * @return array |
||
234 | */ |
||
235 | public function calcPageList($numLinks) |
||
257 | |||
258 | /** |
||
259 | * @param null|int $page |
||
260 | * @return string |
||
261 | */ |
||
262 | public function getPath($page = null) |
||
270 | |||
271 | /** |
||
272 | * @param null|PaginateInterface $paginate |
||
273 | * @param null|ToHtmlInterface $toHtml |
||
274 | * @return ToHtmlInterface |
||
275 | */ |
||
276 | public function getPagination($paginate = null, $toHtml = null) |
||
289 | |||
290 | /** |
||
291 | * @param null|PaginateInterface $paginate |
||
292 | * @param null|ToHtmlInterface $toHtml |
||
293 | */ |
||
294 | public function setPagination($paginate = null, $toHtml = null) |
||
299 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..