This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
31
{
32
foreach (config('auth.guards') as $guard => $content) {
33
if ($content['driver'] == 'passport' && $content['provider'] == $provider) {
34
return $guard;
35
}
36
}
37
}
38
39
/**
40
* Get the user guard on provider with `passport` driver.
41
*
42
* @param Authenticatable $user
43
* @return string|null
44
*/
45
public static function getUserGuard(Authenticatable $user)
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.