| Total Complexity | 2 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class Pagination |
||
| 9 | { |
||
| 10 | /** @var int */ |
||
| 11 | public $pageSize; |
||
| 12 | |||
| 13 | /** @var int Current Page */ |
||
| 14 | public $current; |
||
| 15 | |||
| 16 | /** @var int Total of records */ |
||
| 17 | public $count = 0; |
||
| 18 | |||
| 19 | public $prev; |
||
| 20 | public $next; |
||
| 21 | public $last; |
||
| 22 | public $offset; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param int $pageSize |
||
| 26 | * @param int $current |
||
| 27 | */ |
||
| 28 | public function __construct($pageSize, $current) |
||
| 29 | { |
||
| 30 | $this->pageSize = $pageSize; |
||
| 31 | $this->current = max($current, 1); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function setCount($count) |
||
| 42 | } |
||
| 43 | } |
||
| 44 |