Code Duplication    Length = 8-8 lines in 2 locations

src/Config/AuthConfigHelper.php 1 location

@@ 30-37 (lines=8) @@
27
     * @param  string $provider
28
     * @return string
29
     */
30
    public static function getProviderGuard($provider)
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.

src/PassportMultiauth.php 1 location

@@ 68-75 (lines=8) @@
65
     * @param  string $provider
66
     * @return string
67
     */
68
    public static function getProviderGuard($provider)
69
    {
70
        foreach (config('auth.guards') as $guard => $content) {
71
            if ($content['driver'] == 'passport' && $content['provider'] == $provider) {
72
                return $guard;
73
            }
74
        }
75
    }
76
77
    /**
78
     * Get the user guard on provider with `passport` driver.