1 | <?php |
||
2 | |||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
3 | |||
4 | namespace BristolSU\ControlDB\Contracts\Models; |
||
5 | |||
6 | |||
7 | use BristolSU\ControlDB\Contracts\Models\Tags\PositionTag; |
||
8 | use Illuminate\Contracts\Support\Arrayable; |
||
9 | use Illuminate\Contracts\Support\Jsonable; |
||
10 | use Illuminate\Support\Collection; |
||
11 | |||
12 | /** |
||
13 | * Represents a position |
||
14 | */ |
||
0 ignored issues
–
show
|
|||
15 | interface Position extends Arrayable, Jsonable |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * ID of the position |
||
20 | * |
||
21 | * @return int |
||
22 | */ |
||
23 | public function id(): int; |
||
24 | |||
25 | /** |
||
26 | * The ID of the data provider |
||
27 | * @return int |
||
0 ignored issues
–
show
|
|||
28 | */ |
||
29 | public function dataProviderId(): int; |
||
30 | |||
31 | /** |
||
32 | * Set the data provider ID |
||
33 | * |
||
34 | * @param int $dataProviderId |
||
0 ignored issues
–
show
|
|||
35 | */ |
||
0 ignored issues
–
show
|
|||
36 | public function setDataProviderId(int $dataProviderId): void; |
||
37 | |||
38 | /** |
||
39 | * The data attributes of the position |
||
40 | * |
||
41 | * @return DataPosition |
||
42 | */ |
||
43 | public function data(): DataPosition; |
||
44 | |||
45 | /** |
||
46 | * Roles with this position |
||
47 | * |
||
48 | * @return Collection |
||
49 | */ |
||
50 | public function roles(): Collection; |
||
51 | |||
52 | /** |
||
53 | * Tags the position is tagged with |
||
54 | * |
||
55 | * @return Collection |
||
56 | */ |
||
57 | public function tags(): Collection; |
||
58 | |||
59 | /** |
||
60 | * Add a tag to the position |
||
61 | * |
||
62 | * @param PositionTag $roleTag |
||
0 ignored issues
–
show
|
|||
63 | */ |
||
0 ignored issues
–
show
|
|||
64 | public function addTag(PositionTag $roleTag): void; |
||
65 | |||
66 | /** |
||
67 | * Remove a tag from the position |
||
68 | * |
||
69 | * @param PositionTag $roleTag |
||
0 ignored issues
–
show
|
|||
70 | */ |
||
0 ignored issues
–
show
|
|||
71 | public function removeTag(PositionTag $roleTag): void; |
||
72 | |||
73 | |||
74 | } |
||
75 |