Conditions | 2 |
Paths | 1 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | protected function handel($query, $modelFilters) |
||
|
|||
26 | { |
||
27 | $queryFilters = request()->query(); |
||
28 | |||
29 | return collect($queryFilters)->map(function ($filter, $value) use ($query) { |
||
30 | // Reject if model doesn't has the filter |
||
31 | $normalizedFilters = LaraFilter::normalizeFilters(self::$filters); |
||
32 | if (! $normalizedFilters->get($value)) { |
||
33 | return false; |
||
34 | } |
||
35 | $class = $normalizedFilters->get($value); |
||
36 | |||
37 | return (new $class())->apply($query); |
||
38 | }); |
||
39 | } |
||
40 | } |
||
41 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.