1 | <?php |
||
9 | class SentinelGuard implements StatefulGuard |
||
10 | { |
||
11 | use GuardHelpers; |
||
12 | |||
13 | /** |
||
14 | * @var Sentinel |
||
15 | */ |
||
16 | private $sentinel; |
||
17 | |||
18 | /** |
||
19 | * @var bool |
||
20 | */ |
||
21 | private $viaRemember = false; |
||
22 | |||
23 | /** |
||
24 | * @param GuardableSentinel $sentinel |
||
25 | */ |
||
26 | 60 | public function __construct(GuardableSentinel $sentinel) |
|
30 | |||
31 | /** |
||
32 | * Determine if the current user is authenticated. |
||
33 | * |
||
34 | * @return bool |
||
35 | */ |
||
36 | 3 | public function check() |
|
61 | |||
62 | /** |
||
63 | * Determine if the current user is a guest. |
||
64 | * |
||
65 | * @return bool |
||
66 | */ |
||
67 | 3 | public function guest() |
|
71 | |||
72 | /** |
||
73 | * Get the currently authenticated user. |
||
74 | * |
||
75 | * @return \Illuminate\Contracts\Auth\Authenticatable|null |
||
76 | */ |
||
77 | 9 | public function user() |
|
81 | |||
82 | /** |
||
83 | * Get the ID for the currently authenticated user. |
||
84 | * |
||
85 | * @return int|null |
||
86 | */ |
||
87 | 6 | public function id() |
|
93 | |||
94 | /** |
||
95 | * Validate a user's credentials. |
||
96 | * |
||
97 | * @param array $credentials |
||
98 | * @return bool |
||
99 | */ |
||
100 | 6 | public function validate(array $credentials = []) |
|
109 | |||
110 | /** |
||
111 | * Set the current user. |
||
112 | * |
||
113 | * @param \Illuminate\Contracts\Auth\Authenticatable $user |
||
114 | * @return void |
||
115 | */ |
||
116 | 3 | public function setUser(Authenticatable $user) |
|
120 | |||
121 | /** |
||
122 | * Attempt to authenticate a user using the given credentials. |
||
123 | * |
||
124 | * @param array $credentials |
||
125 | * @param bool $remember |
||
126 | * @return bool |
||
127 | */ |
||
128 | 6 | public function attempt(array $credentials = [], $remember = false) |
|
132 | |||
133 | /** |
||
134 | * Log a user into the application without sessions or cookies. |
||
135 | * |
||
136 | * @param array $credentials |
||
137 | * @return bool |
||
138 | */ |
||
139 | 3 | public function once(array $credentials = []) |
|
143 | |||
144 | /** |
||
145 | * Log a user into the application. |
||
146 | * |
||
147 | * @param \Illuminate\Contracts\Auth\Authenticatable $user |
||
148 | * @param bool $remember |
||
149 | * @return void |
||
150 | */ |
||
151 | 12 | public function login(Authenticatable $user, $remember = false) |
|
155 | |||
156 | /** |
||
157 | * Log the given user ID into the application. |
||
158 | * |
||
159 | * @param mixed $id |
||
160 | * @param bool $remember |
||
161 | * @return \Illuminate\Contracts\Auth\Authenticatable |
||
162 | */ |
||
163 | 9 | public function loginUsingId($id, $remember = false) |
|
174 | |||
175 | /** |
||
176 | * Log the given user ID into the application without sessions or cookies. |
||
177 | * |
||
178 | * @param mixed $id |
||
179 | * @return bool |
||
180 | */ |
||
181 | 6 | public function onceUsingId($id) |
|
189 | |||
190 | /** |
||
191 | * Determine if the user was authenticated via "remember me" cookie. |
||
192 | * |
||
193 | * @return bool |
||
194 | */ |
||
195 | 6 | public function viaRemember() |
|
199 | |||
200 | /** |
||
201 | * Log the user out of the application. |
||
202 | * |
||
203 | * @return void |
||
204 | */ |
||
205 | 3 | public function logout() |
|
209 | } |
||
210 |
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..