Total Complexity | 2 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | abstract class BaseDataFetcher implements DataFetcherInterface |
||
13 | { |
||
14 | protected QueryFilterInterface $queryFilter; |
||
15 | |||
16 | public function __construct(QueryFilterInterface $queryFilter) |
||
17 | { |
||
18 | $this->queryFilter = $queryFilter; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * Responsible for setup and add filters to the base QueryFilter's Query builder |
||
23 | */ |
||
24 | abstract protected function setupQueryFilter(array $configuration = []): void; |
||
25 | |||
26 | /** |
||
27 | * Responsible for providing raw data to fetch, from the configuration (ie: start date, end date, time period, |
||
28 | * empty records flag, interval, period format, presentation format, group by). |
||
29 | */ |
||
30 | protected function getData(array $configuration = []): array |
||
35 | } |
||
36 | } |
||
37 |