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 |
||
59 | 3 | public function applyToQuery(Builder $query) |
|
60 | { |
||
61 | 3 | $this->query = $query; |
|
62 | |||
63 | 3 | foreach ($this->request->all() as $filter => $value) { |
|
64 | 3 | $method = Str::camel($filter); |
|
65 | |||
66 | 3 | if (method_exists($this, $method)) { |
|
67 | 3 | call_user_func([$this, $method], $value); |
|
68 | 3 | } |
|
69 | 3 | } |
|
70 | |||
71 | 3 | return $query; |
|
72 | } |
||
73 | } |
||
74 |
Adding a
@return
annotation 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.