1
0
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:
Marco
2025-05-27 09:32:59 +02:00
parent 1fc2a87232
commit 2d2ff46121

View File

@@ -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();