Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
11 | class UserRolesQuery extends Query |
||
12 | { |
||
13 | use Cacheable; |
||
14 | |||
15 | /** |
||
16 | * Retrieve a Query builder. |
||
17 | * |
||
18 | * @return RoleBuilder |
||
19 | */ |
||
20 | protected function builder(): RoleBuilder |
||
21 | { |
||
22 | return Role::query(); |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Execute the Query. |
||
27 | * |
||
28 | * @return Collection |
||
29 | */ |
||
30 | public function execute(): Collection |
||
31 | { |
||
32 | return $this->builder()->whereTypeUser()->get(); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Retrieve the Query cache key. |
||
37 | * |
||
38 | * @return string |
||
39 | */ |
||
40 | public function cacheKey(): string |
||
43 | } |
||
44 | } |
||
45 |