1 | <?php |
||
2 | |||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
3 | namespace BristolSU\ControlDB\Contracts\Models; |
||
4 | |||
5 | use BristolSU\ControlDB\Contracts\Models\Tags\GroupTag; |
||
6 | use Illuminate\Contracts\Support\Arrayable; |
||
7 | use Illuminate\Contracts\Support\Jsonable; |
||
8 | use Illuminate\Support\Collection; |
||
9 | |||
10 | /** |
||
11 | * Represents a group |
||
12 | */ |
||
0 ignored issues
–
show
|
|||
13 | interface Group extends Arrayable, Jsonable |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * ID of the group |
||
18 | * |
||
19 | * @return int |
||
20 | */ |
||
21 | public function id(): int; |
||
22 | |||
23 | /** |
||
24 | * Get the ID of the data provider |
||
25 | * |
||
26 | * @return int |
||
27 | */ |
||
28 | public function dataProviderId(): int; |
||
29 | |||
30 | /** |
||
31 | * Set the data provider ID |
||
32 | * |
||
33 | * @param int $dataProviderId |
||
0 ignored issues
–
show
|
|||
34 | */ |
||
0 ignored issues
–
show
|
|||
35 | public function setDataProviderId(int $dataProviderId): void; |
||
36 | |||
37 | /** |
||
38 | * Get the DataGroup attached to the group |
||
39 | * |
||
40 | * @return DataGroup |
||
41 | */ |
||
42 | public function data(): DataGroup; |
||
43 | |||
44 | /** |
||
45 | * Members of the group |
||
46 | * |
||
47 | * @return Collection |
||
48 | */ |
||
49 | public function members(): Collection; |
||
50 | |||
51 | /** |
||
52 | * Roles belonging to the group |
||
53 | * |
||
54 | * @return Collection |
||
55 | */ |
||
56 | public function roles(): Collection; |
||
57 | |||
58 | /** |
||
59 | * Tags the group is tagged with |
||
60 | * |
||
61 | * @return Collection |
||
62 | */ |
||
63 | public function tags(): Collection; |
||
64 | |||
65 | /** |
||
66 | * Add a group tag to the group |
||
67 | * |
||
68 | * @param GroupTag $groupTag |
||
0 ignored issues
–
show
|
|||
69 | */ |
||
0 ignored issues
–
show
|
|||
70 | public function addTag(GroupTag $groupTag): void; |
||
71 | |||
72 | /** |
||
73 | * Remove a group tag from the group |
||
74 | * |
||
75 | * @param GroupTag $groupTag |
||
0 ignored issues
–
show
|
|||
76 | */ |
||
0 ignored issues
–
show
|
|||
77 | public function removeTag(GroupTag $groupTag): void; |
||
78 | |||
79 | /** |
||
80 | * Add a user to the group |
||
81 | * |
||
82 | * @param User $user |
||
0 ignored issues
–
show
|
|||
83 | */ |
||
0 ignored issues
–
show
|
|||
84 | public function addUser(User $user): void; |
||
85 | |||
86 | /** |
||
87 | * Remove a user from the group |
||
88 | * |
||
89 | * @param User $user |
||
0 ignored issues
–
show
|
|||
90 | */ |
||
0 ignored issues
–
show
|
|||
91 | public function removeUser(User $user): void; |
||
92 | |||
93 | |||
94 | |||
95 | } |
||
96 |