1 | <?php |
||
8 | class Inputs |
||
9 | { |
||
10 | /** |
||
11 | * @var int |
||
12 | */ |
||
13 | public $defaultLimit = 20; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | public $pagerKey = '_page'; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | public $limitKey = '_limit'; |
||
24 | |||
25 | /** |
||
26 | * @var int|null |
||
27 | */ |
||
28 | private $total = null; |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | private $list = []; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | public $path = ''; |
||
39 | |||
40 | /** |
||
41 | * @var array |
||
42 | */ |
||
43 | public $inputs = []; |
||
44 | |||
45 | /** |
||
46 | * @var string class name of ToHtmlInterface. |
||
47 | */ |
||
48 | private $defaultToHtml = ToBootstrap3::class; |
||
49 | |||
50 | /** |
||
51 | * Inputs constructor. |
||
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() |
||
68 | |||
69 | /** |
||
70 | * get the offset for retrieving data. |
||
71 | * |
||
72 | * @return int |
||
73 | */ |
||
74 | public function getOffset() |
||
78 | |||
79 | /** |
||
80 | * get the current page number, starting from 1. |
||
81 | * |
||
82 | * @return int |
||
83 | */ |
||
84 | public function getPage() |
||
89 | |||
90 | /** |
||
91 | * @param string $key |
||
92 | * @param int $default |
||
93 | * @return int |
||
94 | */ |
||
95 | private function getInt($key, $default) |
||
105 | |||
106 | /** |
||
107 | * get any key from query. |
||
108 | * |
||
109 | * @param string $key |
||
110 | * @param null|mixed $alt |
||
111 | * @return null|mixed |
||
112 | */ |
||
113 | public function get($key, $alt = null) |
||
119 | |||
120 | /** |
||
121 | * get total number of data. |
||
122 | * - total: number of all the possible data which can be retrieved. |
||
123 | * - count: number of data in the current list. |
||
124 | * |
||
125 | * @return int|null |
||
126 | */ |
||
127 | public function getTotal() |
||
131 | |||
132 | /** |
||
133 | * set the total of data. |
||
134 | * |
||
135 | * @param int|null $total |
||
136 | */ |
||
137 | public function setTotal($total) |
||
141 | |||
142 | /** |
||
143 | * set the data for list. |
||
144 | * |
||
145 | * @param mixed $list |
||
146 | */ |
||
147 | public function setList($list) |
||
151 | |||
152 | /** |
||
153 | * get the data for list. |
||
154 | * |
||
155 | * @return null|array|mixed |
||
156 | */ |
||
157 | public function getList() |
||
161 | |||
162 | /** |
||
163 | * get the count, i.e. number of data in the current list. |
||
164 | * count is the number of data in the current list. |
||
165 | * |
||
166 | * @return int |
||
167 | */ |
||
168 | public function getCount() |
||
175 | |||
176 | /** |
||
177 | * calculates the first page number, that is 1. |
||
178 | * |
||
179 | * @return int |
||
180 | */ |
||
181 | public function calcFirstPage() |
||
185 | |||
186 | /** |
||
187 | * calculates the last pager number. |
||
188 | * |
||
189 | * @return int |
||
190 | */ |
||
191 | public function calcLastPage() |
||
200 | |||
201 | /** |
||
202 | * @param null|int $page |
||
203 | * @return string |
||
204 | */ |
||
205 | public function getPath($page = null) |
||
213 | |||
214 | /** |
||
215 | * @return PaginateInterface |
||
216 | */ |
||
217 | public function getPagination() |
||
221 | |||
222 | /** |
||
223 | * @return string |
||
224 | */ |
||
225 | public function __toString() |
||
231 | |||
232 | /** |
||
233 | * set a class to convert to html pagination. |
||
234 | * The class must implement ToHtmlInterface. |
||
235 | * |
||
236 | * @param string $defaultToHtml |
||
237 | */ |
||
238 | public function setDefaultToHtml($defaultToHtml) |
||
242 | } |
||
243 |
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..