| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class Pagination |
||
| 9 | { |
||
| 10 | public int $current; |
||
| 11 | public int $pageSize; |
||
| 12 | public int $count = 0; |
||
| 13 | public int $prev; |
||
| 14 | public int $next; |
||
| 15 | public int $last; |
||
| 16 | public int $offset; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param int $pageSize |
||
| 20 | * @param int $current |
||
| 21 | */ |
||
| 22 | public function __construct($pageSize, $current) |
||
| 23 | { |
||
| 24 | $this->pageSize = $pageSize; |
||
| 25 | $this->current = max($current, 1); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function setCount($count) |
||
| 36 | } |
||
| 37 | } |
||
| 38 |