Total Complexity | 5 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | trait WithTrait |
||
12 | { |
||
13 | /** |
||
14 | * @var array |
||
15 | */ |
||
16 | protected array $withs = []; |
||
17 | |||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | protected array $withCounts = []; |
||
22 | |||
23 | /** |
||
24 | * @param array|string $relation |
||
25 | * |
||
26 | * @return self |
||
27 | */ |
||
28 | public function with(array|string $relation): self |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param array|string $relation |
||
38 | * |
||
39 | * @return self |
||
40 | */ |
||
41 | public function withCount(array|string $relation): self |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @param Builder|Relation $query |
||
51 | * |
||
52 | * @return void |
||
53 | */ |
||
54 | protected function addWith(Builder|Relation $query) |
||
60 |