Total Complexity | 7 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Coverage | 71.43% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
5 | trait RoleTrait |
||
6 | { |
||
7 | /** |
||
8 | * @return bool |
||
9 | */ |
||
10 | 34 | public function isSuperAdmin() |
|
11 | { |
||
12 | 34 | return $this->role_id == config('constants.ROLE_SUPERADMIN'); |
|
13 | } |
||
14 | |||
15 | /** |
||
16 | * @return bool |
||
17 | */ |
||
18 | 29 | public function isFederationPresident() |
|
19 | { |
||
20 | 29 | return $this->role_id == config('constants.ROLE_FEDERATION_PRESIDENT'); |
|
21 | } |
||
22 | |||
23 | /** |
||
24 | * @return bool |
||
25 | */ |
||
26 | 29 | public function isAssociationPresident() |
|
27 | { |
||
28 | 29 | return $this->role_id == config('constants.ROLE_ASSOCIATION_PRESIDENT'); |
|
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return bool |
||
33 | */ |
||
34 | 28 | public function isClubPresident() |
|
35 | { |
||
36 | 28 | return $this->role_id == config('constants.ROLE_CLUB_PRESIDENT'); |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return bool |
||
41 | */ |
||
42 | public function isUser() |
||
43 | { |
||
44 | return $this->role_id == config('constants.ROLE_USER'); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return bool |
||
49 | */ |
||
50 | 5 | public function isUserOrMore() |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * @param $tournament |
||
57 | * @return bool |
||
58 | */ |
||
59 | public function isOwner($tournament) |
||
62 | } |
||
63 | } |