1 | <?php |
||
8 | class Inputs |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | public $pagerKey = '_page'; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | public $limitKey = '_limit'; |
||
19 | |||
20 | /** |
||
21 | * @var int|null |
||
22 | */ |
||
23 | private $total = null; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | private $list = []; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | public $path = ''; |
||
34 | |||
35 | /** |
||
36 | * @var array |
||
37 | */ |
||
38 | public $inputs = []; |
||
39 | |||
40 | /** |
||
41 | * @var string class name of ToHtmlInterface. |
||
42 | */ |
||
43 | private $defaultToHtml = ToBootstrap3::class; |
||
44 | |||
45 | /** |
||
46 | * Inputs constructor. |
||
47 | * |
||
48 | */ |
||
49 | public function __construct() |
||
52 | |||
53 | /** |
||
54 | * get the limit, i.e. number of data per page. |
||
55 | * |
||
56 | * @return int |
||
57 | */ |
||
58 | public function getLimit() |
||
62 | |||
63 | /** |
||
64 | * get the offset for retrieving data. |
||
65 | * |
||
66 | * @return int |
||
67 | */ |
||
68 | public function getOffset() |
||
72 | |||
73 | /** |
||
74 | * get the current page number, starting from 1. |
||
75 | * |
||
76 | * @return int |
||
77 | */ |
||
78 | public function getPage() |
||
82 | |||
83 | /** |
||
84 | * get any key from query. |
||
85 | * |
||
86 | * @param string $key |
||
87 | * @param null|mixed $alt |
||
88 | * @return null|mixed |
||
89 | */ |
||
90 | public function get($key, $alt = null) |
||
96 | |||
97 | /** |
||
98 | * get total number of data. |
||
99 | * - total: number of all the possible data which can be retrieved. |
||
100 | * - count: number of data in the current list. |
||
101 | * |
||
102 | * @return int|null |
||
103 | */ |
||
104 | public function getTotal() |
||
108 | |||
109 | /** |
||
110 | * set the total of data. |
||
111 | * |
||
112 | * @param int|null $total |
||
113 | */ |
||
114 | public function setTotal($total) |
||
118 | |||
119 | /** |
||
120 | * set the data for list. |
||
121 | * |
||
122 | * @param mixed $list |
||
123 | */ |
||
124 | public function setList($list) |
||
128 | |||
129 | /** |
||
130 | * get the data for list. |
||
131 | * |
||
132 | * @return null|array|mixed |
||
133 | */ |
||
134 | public function getList() |
||
138 | |||
139 | /** |
||
140 | * get the count, i.e. number of data in the current list. |
||
141 | * count is the number of data in the current list. |
||
142 | * |
||
143 | * @return int |
||
144 | */ |
||
145 | public function getCount() |
||
152 | |||
153 | /** |
||
154 | * calculates the first page number, that is 1. |
||
155 | * |
||
156 | * @return int |
||
157 | */ |
||
158 | public function calcFirstPage() |
||
162 | |||
163 | /** |
||
164 | * calculates the last pager number. |
||
165 | * |
||
166 | * @return int |
||
167 | */ |
||
168 | public function calcLastPage() |
||
177 | |||
178 | /** |
||
179 | * @param null|int $page |
||
180 | * @return string |
||
181 | */ |
||
182 | public function getPath($page = null) |
||
190 | |||
191 | /** |
||
192 | * @return PaginateInterface |
||
193 | */ |
||
194 | public function getPagination() |
||
198 | |||
199 | /** |
||
200 | * @return string |
||
201 | */ |
||
202 | public function __toString() |
||
208 | |||
209 | /** |
||
210 | * set a class to convert to html pagination. |
||
211 | * The class must implement ToHtmlInterface. |
||
212 | * |
||
213 | * @param string $defaultToHtml |
||
214 | */ |
||
215 | public function setDefaultToHtml($defaultToHtml) |
||
219 | } |
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..