bristol-su /
control
| 1 | <?php |
||
| 2 | |||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 3 | namespace BristolSU\ControlDB\Contracts\Models; |
||
| 4 | |||
| 5 | use BristolSU\ControlDB\AdditionalProperties\ImplementsAdditionalProperties; |
||
| 6 | use Illuminate\Contracts\Support\Arrayable; |
||
| 7 | use Illuminate\Contracts\Support\Jsonable; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Handles information about a role |
||
| 11 | */ |
||
|
0 ignored issues
–
show
|
|||
| 12 | interface DataRole extends ImplementsAdditionalProperties, Arrayable, Jsonable |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Get the ID of the data role |
||
| 17 | * |
||
| 18 | * @return int |
||
| 19 | */ |
||
| 20 | public function id(): int; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Get the name of the role |
||
| 24 | * |
||
| 25 | * @return string|null |
||
| 26 | */ |
||
| 27 | public function roleName(): ?string; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Get the email of the role |
||
| 31 | * |
||
| 32 | * @return string|null |
||
| 33 | */ |
||
| 34 | public function email(): ?string; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Set the role name |
||
| 38 | * |
||
| 39 | * @param string|null $roleName |
||
|
0 ignored issues
–
show
|
|||
| 40 | */ |
||
|
0 ignored issues
–
show
|
|||
| 41 | public function setRoleName(?string $roleName): void; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Set the role email |
||
| 45 | * |
||
| 46 | * @param string|null $email |
||
|
0 ignored issues
–
show
|
|||
| 47 | */ |
||
|
0 ignored issues
–
show
|
|||
| 48 | public function setEmail(?string $email): void; |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Get the role using the data attributes |
||
| 52 | * |
||
| 53 | * @return Role|null |
||
| 54 | */ |
||
| 55 | public function role(): ?Role; |
||
| 56 | |||
| 57 | |||
| 58 | } |