| Total Complexity | 8 |
| Total Lines | 65 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | class AuthException extends BaseException |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @return AuthException |
||
| 27 | */ |
||
| 28 | public static function incorrectCredentials(): AuthException |
||
| 29 | { |
||
| 30 | return new static(t('exception.incorrect_auth_credentials')); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return AuthException |
||
| 35 | */ |
||
| 36 | public static function inactiveAccount(): AuthException |
||
| 37 | { |
||
| 38 | return new static(t('exception.inactive_account')); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return AuthException |
||
| 43 | */ |
||
| 44 | public static function incorrectVerificationCode(): AuthException |
||
| 45 | { |
||
| 46 | return new static(t('exception.incorrect_verification_code')); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return AuthException |
||
| 51 | */ |
||
| 52 | public static function verificationCodeExpired(): AuthException |
||
| 53 | { |
||
| 54 | return new static(t('exception.verification_code_expired')); |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return AuthException |
||
| 59 | */ |
||
| 60 | public static function misconfiguredAuthConfig(): AuthException |
||
| 61 | { |
||
| 62 | return new static(t('exception.misconfigured_auth_config')); |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @param string $name |
||
| 67 | * @return AuthException |
||
| 68 | */ |
||
| 69 | public static function undefinedAuthType(string $name): AuthException |
||
| 70 | { |
||
| 71 | return new static(t('exception.undefined_auth_type', $name)); |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return AuthException |
||
| 76 | */ |
||
| 77 | public static function incorrectUserSchema(): AuthException |
||
| 78 | { |
||
| 79 | return new static(t('exception.incorrect_user_schema')); |
||
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return AuthException |
||
| 84 | */ |
||
| 85 | public static function incorrectAuthService(): AuthException |
||
| 88 | } |
||
| 89 | } |