Total Complexity | 4 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class UserInfo |
||
17 | { |
||
18 | /** |
||
19 | * User role name |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | public $role; |
||
24 | |||
25 | /** |
||
26 | * User permissions |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | public $permissions; |
||
31 | |||
32 | /** |
||
33 | * Object roles |
||
34 | * |
||
35 | * @var Roles |
||
36 | */ |
||
37 | private $roles; |
||
38 | |||
39 | /** |
||
40 | * UserInfo constructor. |
||
41 | * |
||
42 | * @param string|null $userRole Role of the user |
||
43 | * @param Roles $roles Roles object |
||
44 | */ |
||
45 | public function __construct(?string $userRole, Roles $roles) |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * Get permissions por this user |
||
54 | * |
||
55 | * @return array |
||
56 | */ |
||
57 | private function getPermissions(): array |
||
64 | } |
||
65 | } |