Skip to content

Commit 5f878b5

Browse files
committed
fix: phpstan
1 parent 6a501b0 commit 5f878b5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

framework/core/src/Mail/SetTranslatorLocaleForEmailTrait.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ trait SetTranslatorLocaleForEmailTrait
2121
* Falls back to forum default if user not found or has no preference.
2222
*/
2323
protected function setTranslatorLocaleForEmail(
24-
TranslatorInterface&Translator $translator,
24+
TranslatorInterface $translator,
2525
SettingsRepositoryInterface $settings,
2626
string $email
2727
): void {
@@ -31,7 +31,8 @@ protected function setTranslatorLocaleForEmail(
3131
$locale = $user
3232
? ($user->getPreference('locale') ?? $settings->get('default_locale'))
3333
: $settings->get('default_locale');
34-
34+
35+
/** @var TranslatorInterface&Translator $translator */
3536
$translator->setLocale($locale);
3637
}
3738
}

0 commit comments

Comments
 (0)