@@ -7,7 +7,7 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * Check whether the current user is authorized to impersonate. |
| 9 | 9 | * |
| 10 | - * @param null $guard |
|
| 10 | + * @param null|string $guard |
|
| 11 | 11 | * @return bool |
| 12 | 12 | */ |
| 13 | 13 | function can_impersonate(string $guard = null): bool |
@@ -2,14 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Lab404\Impersonate\Events; |
| 4 | 4 | |
| 5 | -use Illuminate\Broadcasting\Channel; |
|
| 6 | 5 | use Illuminate\Contracts\Auth\Authenticatable; |
| 7 | 6 | use Illuminate\Queue\SerializesModels; |
| 8 | -use Illuminate\Broadcasting\PrivateChannel; |
|
| 9 | -use Illuminate\Broadcasting\PresenceChannel; |
|
| 10 | 7 | use Illuminate\Foundation\Events\Dispatchable; |
| 11 | 8 | use Illuminate\Broadcasting\InteractsWithSockets; |
| 12 | -use Illuminate\Contracts\Broadcasting\ShouldBroadcast; |
|
| 13 | 9 | |
| 14 | 10 | class LeaveImpersonation |
| 15 | 11 | { |
@@ -2,14 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Lab404\Impersonate\Events; |
| 4 | 4 | |
| 5 | -use Illuminate\Broadcasting\Channel; |
|
| 6 | 5 | use Illuminate\Contracts\Auth\Authenticatable; |
| 7 | 6 | use Illuminate\Queue\SerializesModels; |
| 8 | -use Illuminate\Broadcasting\PrivateChannel; |
|
| 9 | -use Illuminate\Broadcasting\PresenceChannel; |
|
| 10 | 7 | use Illuminate\Foundation\Events\Dispatchable; |
| 11 | 8 | use Illuminate\Broadcasting\InteractsWithSockets; |
| 12 | -use Illuminate\Contracts\Broadcasting\ShouldBroadcast; |
|
| 13 | 9 | |
| 14 | 10 | class TakeImpersonation |
| 15 | 11 | { |
@@ -9,8 +9,7 @@ discard block |
||
| 9 | 9 | /** |
| 10 | 10 | * Log a user into the application without firing the Login event. |
| 11 | 11 | * |
| 12 | - * @param \Illuminate\Contracts\Auth\Authenticatable $user |
|
| 13 | - * @return void |
|
| 12 | + * @return \Closure |
|
| 14 | 13 | */ |
| 15 | 14 | public function quietLogin() |
| 16 | 15 | { |
@@ -26,7 +25,7 @@ discard block |
||
| 26 | 25 | * and without firing the Logout event. |
| 27 | 26 | * |
| 28 | 27 | * @param void |
| 29 | - * @return void |
|
| 28 | + * @return \Closure |
|
| 30 | 29 | */ |
| 31 | 30 | public function quietLogout() |
| 32 | 31 | { |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use Illuminate\Auth\Events\Login; |
| 7 | 7 | use Illuminate\Auth\Events\Logout; |
| 8 | 8 | use Illuminate\Auth\SessionGuard; |
| 9 | -use Illuminate\Foundation\Application; |
|
| 10 | 9 | use Illuminate\Support\Facades\Event; |
| 11 | 10 | use Illuminate\View\Compilers\BladeCompiler; |
| 12 | 11 | use Lab404\Impersonate\Guard\SessionGuardMixin; |