mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-02 14:17:26 +02:00
Improve code style
This commit is contained in:
@@ -1387,10 +1387,10 @@ final class Auth extends UserManager {
|
||||
$otpValue = $this->generateAndStoreRandomOneTimePassword($userId, $twoFactorMethod['mechanism']);
|
||||
|
||||
if (((int) $twoFactorMethod['mechanism']) === self::TWO_FACTOR_MECHANISM_SMS) {
|
||||
$secondFactorRequiredException->addSmsOption($otpValue, $twoFactorMethod['seed'], \Delight\Auth\PhoneNumber::mask($twoFactorMethod['seed']));
|
||||
$secondFactorRequiredException->addSmsOption($otpValue, $twoFactorMethod['seed'], PhoneNumber::mask($twoFactorMethod['seed']));
|
||||
}
|
||||
elseif (((int) $twoFactorMethod['mechanism']) === self::TWO_FACTOR_MECHANISM_EMAIL) {
|
||||
$secondFactorRequiredException->addEmailOption($otpValue, $twoFactorMethod['seed'], \Delight\Auth\EmailAddress::mask($twoFactorMethod['seed']));
|
||||
$secondFactorRequiredException->addEmailOption($otpValue, $twoFactorMethod['seed'], EmailAddress::mask($twoFactorMethod['seed']));
|
||||
}
|
||||
else {
|
||||
throw new InvalidStateError();
|
||||
|
Reference in New Issue
Block a user