| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 46 | 3 | public function applyToQuery(Builder $query) |
|
| 47 | { |
||
| 48 | 3 | $this->query = $query; |
|
| 49 | |||
| 50 | 3 | foreach ($this->request->all() as $filter => $value) { |
|
| 51 | 3 | $method = Str::camel($filter); |
|
| 52 | |||
| 53 | 3 | if (method_exists($this, $method)) { |
|
| 54 | 3 | call_user_func([$this, $method], $value); |
|
| 55 | 3 | } |
|
| 56 | 3 | } |
|
| 57 | |||
| 58 | 3 | return $query; |
|
| 59 | } |
||
| 60 | } |
||
| 61 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.