Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
32 | public function boot() |
||
33 | { |
||
34 | if (request()->headers->has('x-user-key')) { |
||
35 | $user_id = request()->headers->get('x-user-key'); |
||
36 | Auth::guard('web')->loginUsingId($user_id); |
||
37 | } |
||
38 | |||
39 | if (! config('faithgen-sdk.source')) { |
||
40 | Auth::viaRequest('api-key', function ($request) { |
||
|
|||
41 | $api_key = request()->headers->get('x-api-key'); |
||
42 | $class = config('auth.providers.ministries.model'); |
||
43 | |||
44 | return $class::whereHas('apiKey', function ($apiKey) use ($api_key) { |
||
45 | return $apiKey->where('api_key', $api_key); |
||
46 | })->first(); |
||
47 | }); |
||
51 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.