| 1 | <?php namespace Arcanesoft\Auth\Helpers; |
||
| 11 | class UserImpersonator |
||
| 12 | { |
||
| 13 | /* ------------------------------------------------------------------------------------------------ |
||
| 14 | | Main Functions |
||
| 15 | | ------------------------------------------------------------------------------------------------ |
||
| 16 | */ |
||
| 17 | /** |
||
| 18 | * @param \Arcanesoft\Contracts\Auth\Models\User $user |
||
| 19 | * |
||
| 20 | * @return bool |
||
| 21 | */ |
||
| 22 | public static function start(User $user) |
||
| 30 | |||
| 31 | public static function stop() |
||
| 35 | |||
| 36 | public static function isImpersonating() |
||
| 40 | } |
||
| 41 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: