| Total Complexity | 8 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class AuthConfigHelper |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Get the user provider on configs. |
||
| 12 | * |
||
| 13 | * @param Authenticatable $user |
||
| 14 | * @return string|null |
||
| 15 | * @throws MissingConfigException |
||
| 16 | */ |
||
| 17 | 15 | public static function getUserProvider(Authenticatable $user) |
|
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get the guard of specific provider to `passport` driver. |
||
| 30 | * |
||
| 31 | * @param string $provider |
||
| 32 | * @param Authenticatable $user |
||
| 33 | * @return string |
||
| 34 | * @throws MissingConfigException |
||
| 35 | */ |
||
| 36 | 11 | public static function getProviderGuard($provider, Authenticatable $user) |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Get the user guard on provider with `passport` driver. |
||
| 49 | * |
||
| 50 | * @param Authenticatable $user |
||
| 51 | * @return string|null |
||
| 52 | * @throws MissingConfigException |
||
| 53 | */ |
||
| 54 | 9 | public static function getUserGuard(Authenticatable $user) |
|
| 61 |