| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function handle($request, Closure $next) |
||
| 21 | { |
||
| 22 | $guid = $request->input('guid'); |
||
| 23 | $user = User::where('mmex_guid', $guid)->first(); |
||
| 24 | |||
| 25 | if ($user && $guid == $user->mmex_guid) { |
||
| 26 | // login user on api guard (simple alternative login method) |
||
| 27 | Auth::guard('api')->setUser($user); |
||
| 28 | |||
| 29 | return $next($request); |
||
| 30 | } |
||
| 31 | |||
| 32 | return response(MmexConstants::$wrong_guid) |
||
|
|
|||
| 33 | ->header('Content-Type', 'text/plain; charset=UTF-8'); |
||
| 34 | } |
||
| 35 | } |
||
| 36 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.