Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Sep 5, 2024
1 parent 96eafa6 commit 99029c0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/NotificationCenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,11 @@ public function createBasicStampsForNotification(int $id, TokenCollection|array

$stamps = new StampCollection([new NotificationConfigStamp($notificationConfig)]);

if (
null !== $locale
|| (($request = $this->requestStack->getCurrentRequest()) instanceof Request && $locale = $request->getLocale())
) {
if (null === $locale && ($request = $this->requestStack->getCurrentRequest()) instanceof Request) {
$locale = $request->getLocale();
}

if ($locale) {
$stamps = $stamps->with(new LocaleStamp(LocaleUtil::formatAsLocale($locale)));
}

Expand Down

0 comments on commit 99029c0

Please sign in to comment.