| Total Complexity | 7 | 
| Total Lines | 53 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 1 | Features | 0 | 
| 1 | <?php  | 
            ||
| 10 | class ORMDataSource implements DataSourceInterface  | 
            ||
| 11 | { | 
            ||
| 12 | private QueryBuilder $data;  | 
            ||
| 13 | private bool $pagination;  | 
            ||
| 14 | private int $page;  | 
            ||
| 15 | private int $maxPerPage;  | 
            ||
| 16 | private array $orderBy;  | 
            ||
| 17 | private array $filters;  | 
            ||
| 18 | |||
| 19 | public function __construct(  | 
            ||
| 20 | QueryBuilder $data,  | 
            ||
| 21 | bool $pagination,  | 
            ||
| 22 | int $page = 1,  | 
            ||
| 23 | int $maxPerPage = 25,  | 
            ||
| 24 | array $orderBy = [],  | 
            ||
| 25 | array $filters = []  | 
            ||
| 26 |     ) { | 
            ||
| 27 | $this->data = $data;  | 
            ||
| 28 | $this->pagination = $pagination;  | 
            ||
| 29 | $this->page = $page;  | 
            ||
| 30 | $this->maxPerPage = $maxPerPage;  | 
            ||
| 31 | $this->orderBy = $orderBy;  | 
            ||
| 32 | $this->filters = $filters;  | 
            ||
| 33 | }  | 
            ||
| 34 | |||
| 35 | public function getData(): QueryBuilder  | 
            ||
| 36 |     { | 
            ||
| 37 | return $this->data;  | 
            ||
| 38 | }  | 
            ||
| 39 | |||
| 40 | public function isPaginated(): bool  | 
            ||
| 41 |     { | 
            ||
| 42 | return $this->pagination;  | 
            ||
| 43 | }  | 
            ||
| 44 | |||
| 45 | public function getPage(): int  | 
            ||
| 46 |     { | 
            ||
| 47 | return $this->page;  | 
            ||
| 48 | }  | 
            ||
| 49 | |||
| 50 | public function getMaxPerPage(): int  | 
            ||
| 51 |     { | 
            ||
| 52 | return $this->maxPerPage;  | 
            ||
| 53 | }  | 
            ||
| 54 | |||
| 55 | public function getOrderBy(): array  | 
            ||
| 56 |     { | 
            ||
| 57 | return $this->orderBy;  | 
            ||
| 58 | }  | 
            ||
| 59 | |||
| 60 | public function getFilters(): array  | 
            ||
| 63 | }  | 
            ||
| 64 | }  | 
            ||
| 65 |