Total Complexity | 9 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | trait WithFilters |
||
8 | { |
||
9 | protected $filters; |
||
10 | |||
11 | 15 | public function enableFilters($filters) |
|
18 | } |
||
19 | |||
20 | 15 | protected function formatFilters($filters) |
|
21 | { |
||
22 | return collect($filters)->map(function ($filter) { |
||
23 | 15 | if ($filter instanceof Filter) { |
|
24 | 14 | return $filter; |
|
25 | } |
||
26 | |||
27 | 1 | return Filter::exact($filter); |
|
28 | 15 | }); |
|
29 | } |
||
30 | |||
31 | 15 | protected function applyFilters() |
|
43 | } |
||
44 | 15 | }); |
|
45 | 15 | } |
|
46 | |||
47 | 15 | protected function isRequestedFilter(Filter $filter) |
|
50 | } |
||
51 | |||
52 | 14 | protected function getFilterValue(Filter $filter) |
|
57 |