Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function terminate($request, $response): void |
||
|
|||
34 | { |
||
35 | if ($user = $request->user(request()->route('guard'))) { |
||
36 | // We are using database queries rather than eloquent, to bypass triggering events. |
||
37 | // Triggering update events flush cache and costs us more queries, which we don't need. |
||
38 | $user->newQuery()->where($user->getKeyName(), $user->getKey())->update(['last_activity' => now()]); |
||
39 | } |
||
40 | } |
||
41 | } |
||
42 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.