1 | <?php |
||
17 | class Pagination |
||
18 | { |
||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | public $limit; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | public $current; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | public $prev = null; |
||
33 | |||
34 | /** |
||
35 | * @var int |
||
36 | */ |
||
37 | public $next = null; |
||
38 | |||
39 | /** |
||
40 | * @var int |
||
41 | */ |
||
42 | public $pages = 0; |
||
43 | |||
44 | /** |
||
45 | * @var int |
||
46 | */ |
||
47 | public $total; |
||
48 | |||
49 | /** |
||
50 | * Constructor. |
||
51 | * |
||
52 | * @param int $limit |
||
53 | * @param int $current |
||
54 | */ |
||
55 | public function __construct($limit, $current) |
||
64 | |||
65 | /** |
||
66 | * @param int $total |
||
67 | */ |
||
68 | public function calc($total) |
||
76 | |||
77 | /** |
||
78 | * @return array |
||
79 | */ |
||
80 | public function serialize() |
||
89 | } |
||
90 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.