| Total Complexity | 7 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | abstract class AbstractPaginatedResponse |
||
| 6 | { |
||
| 7 | public function __construct(protected mixed $data, protected int $limit, protected ?int $total = null) |
||
| 9 | } |
||
| 10 | |||
| 11 | public function getData(): mixed |
||
| 12 | { |
||
| 13 | return $this->data; |
||
| 14 | } |
||
| 15 | |||
| 16 | public function setData(mixed $data): void |
||
| 17 | { |
||
| 18 | $this->data = $data; |
||
| 19 | } |
||
| 20 | |||
| 21 | public function getLimit(): int |
||
| 22 | { |
||
| 23 | return $this->limit; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function setLimit(int $limit): void |
||
| 27 | { |
||
| 28 | 10 | $this->limit = $limit; |
|
| 29 | } |
||
| 30 | 10 | ||
| 31 | 10 | public function getTotal(): ?int |
|
| 32 | 10 | { |
|
| 33 | 10 | return $this->total; |
|
| 34 | } |
||
| 35 | |||
| 36 | public function setTotal(?int $total): void |
||
| 39 | } |
||
| 40 | } |
||
| 41 |