Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 1 | public function apply(NovaRequest $request, $query, $value) |
|
22 | { |
||
23 | 1 | $selected = array_filter($value); |
|
24 | 1 | if (count($selected)) { |
|
25 | 1 | return $query->whereHas( |
|
26 | 1 | $this->relationName, |
|
27 | 1 | fn (Builder $q) => $q->whereKey(array_keys($selected)) |
|
28 | 1 | ); |
|
29 | } |
||
30 | |||
31 | 1 | return $query; |
|
32 | } |
||
56 |