| 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 $offset = 0; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @var int |
||
| 51 | */ |
||
| 52 | public $total; |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Constructor. |
||
| 56 | * |
||
| 57 | * @param int $limit |
||
| 58 | * @param int $current |
||
| 59 | */ |
||
| 60 | public function __construct($limit, $current) |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @param int $total |
||
| 73 | */ |
||
| 74 | public function calc($total) |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @return array |
||
| 86 | */ |
||
| 87 | public function serialize() |
||
| 97 | } |
||
| 98 |
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.