1 | <?php namespace Usman\Guardian\AccessControl; |
||
5 | class Guardian { |
||
6 | |||
7 | /** |
||
8 | * The current logged in user |
||
9 | * |
||
10 | * @var User |
||
11 | */ |
||
12 | protected $user; |
||
13 | |||
14 | /** |
||
15 | * The auth driver manager instance |
||
16 | * |
||
17 | * @var Illuminate\Auth\AuthManager |
||
18 | */ |
||
19 | protected $auth; |
||
20 | |||
21 | /** |
||
22 | * @var boolean |
||
23 | */ |
||
24 | protected $loggedIn; |
||
25 | |||
26 | /** |
||
27 | * Creates an instance of Guardian |
||
28 | * |
||
29 | * @param Illuminate\Auth\AuthManager $auth |
||
30 | */ |
||
31 | public function __construct(AuthManager $auth) |
||
36 | |||
37 | /** |
||
38 | * Checks for a role |
||
39 | * |
||
40 | * @param string $roleName |
||
41 | * @return boolean |
||
42 | */ |
||
43 | public function hasRole($role) |
||
49 | |||
50 | /** |
||
51 | * Checks for any role |
||
52 | * |
||
53 | * @param array $roleNames |
||
54 | * @return boolean |
||
55 | */ |
||
56 | public function hasAnyRole(array $roleNames) |
||
62 | |||
63 | /** |
||
64 | * Checks for all roles |
||
65 | * |
||
66 | * @param array $roleNames |
||
67 | * @return boolean |
||
68 | */ |
||
69 | public function hasAllRoles(array $roleNames) |
||
75 | |||
76 | /** |
||
77 | * Checks if a user has a capability |
||
78 | * |
||
79 | * @param string $capabilityName |
||
80 | * @return boolean |
||
81 | */ |
||
82 | public function hasCapability($capability) |
||
89 | |||
90 | /** |
||
91 | * Checks if a user has any capability |
||
92 | * |
||
93 | * @param array $capabilityNames |
||
94 | * @return boolean |
||
95 | */ |
||
96 | public function hasAnyCapability(array $capabilityNames) |
||
102 | |||
103 | /** |
||
104 | * Checks if a user has all the capabilities |
||
105 | * |
||
106 | * @param array $capabilityNames |
||
107 | * @return boolean |
||
108 | */ |
||
109 | public function hasAllCapabilities(array $capabilityNames) |
||
115 | |||
116 | /** |
||
117 | * Initializes the Guardian instance. |
||
118 | * |
||
119 | * @return void |
||
120 | */ |
||
121 | protected function init() |
||
141 | |||
142 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..