Skip to content

Commit 1ca477d

Browse files
committed
fix: replace by match
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent ed5cb96 commit 1ca477d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Service/SetupService.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ public function startSetup(IUser $user, string $gatewayName, string $identifier)
5959
$verificationNumber = $this->random->generate(6, ISecureRandom::CHAR_DIGITS);
6060
$gateway = $this->gatewayFactory->get($gatewayName);
6161
try {
62-
$message = $gateway->getSettings()['allow_markdown'] ?? false
63-
? $this->l10n->t('`%s` is your verification code.', [$verificationNumber])
64-
: $this->l10n->t('%s is your verification code.', [$verificationNumber]);
62+
$message = match ($gateway->getSettings()['allow_markdown'] ?? false) {
63+
true => $this->l10n->t('`%s` is your verification code.', [$verificationNumber]),
64+
default => $this->l10n->t('%s is your verification code.', [$verificationNumber]),
65+
};
6566
$gateway->send(
6667
$identifier,
6768
$message,

0 commit comments

Comments
 (0)