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