| 1 | <?php |
||
| 11 | class AuthController extends Controller |
||
| 12 | { |
||
| 13 | private $auth; |
||
| 14 | private $logger; |
||
| 15 | |||
| 16 | public function __construct(JWTAuth $auth, Logger $logger) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Log a user in. |
||
| 24 | * |
||
| 25 | * @return JsonResponse |
||
| 26 | */ |
||
| 27 | public function login(UserLoginRequest $request) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Log the current user out. |
||
| 37 | * |
||
| 38 | * @return JsonResponse |
||
| 39 | */ |
||
| 40 | public function logout() |
||
| 52 | } |
||
| 53 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.