| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.7898 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 5 | public function filter(Request $request) |
|
| 32 | { |
||
| 33 | 5 | $filteredValues = new ParameterBag(); |
|
| 34 | |||
| 35 | 5 | foreach ($this->filters as $filter) { |
|
| 36 | $value = $request->get($filter); |
||
| 37 | |||
| 38 | if ($value !== null) { |
||
| 39 | $filteredValues->set($filter, $value); |
||
| 40 | } |
||
| 41 | 5 | } |
|
| 42 | 5 | return $filteredValues; |
|
| 43 | } |
||
| 44 | } |
||
| 45 |