Remove commented code

This commit is contained in:
Julie Lenaerts 2025-07-03 11:51:54 +02:00
parent ac16060441
commit a3e70e0beb
2 changed files with 6 additions and 7 deletions

View File

@ -20,13 +20,13 @@ use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler; use Symfony\Component\Messenger\Attribute\AsMessageHandler;
#[AsMessageHandler] #[AsMessageHandler]
class SendImmediateNotificationEmailHandler readonly class SendImmediateNotificationEmailHandler
{ {
public function __construct( public function __construct(
private readonly NotificationRepository $notificationRepository, private NotificationRepository $notificationRepository,
private readonly UserRepository $userRepository, private UserRepository $userRepository,
private readonly NotificationMailer $notificationMailer, private NotificationMailer $notificationMailer,
private readonly LoggerInterface $logger, private LoggerInterface $logger,
) {} ) {}
/** /**

View File

@ -73,7 +73,6 @@ readonly class NotificationMailer
public function postPersistNotification(Notification $notification, PostPersistEventArgs $eventArgs): void public function postPersistNotification(Notification $notification, PostPersistEventArgs $eventArgs): void
{ {
$this->sendNotificationEmailsToAddressees($notification); $this->sendNotificationEmailsToAddressees($notification);
// $this->sendNotificationEmailsToAddressesEmails($notification);
} }
public function postUpdateNotification(Notification $notification, PostUpdateEventArgs $eventArgs): void public function postUpdateNotification(Notification $notification, PostUpdateEventArgs $eventArgs): void
@ -109,7 +108,7 @@ readonly class NotificationMailer
match ($emailPreference) { match ($emailPreference) {
'immediate-email' => $this->scheduleImmediateEmail($notification, $addressee), 'immediate-email' => $this->scheduleImmediateEmail($notification, $addressee),
'daily-email' => $this->scheduleDailyEmail($notification, $addressee), 'daily-email' => $this->scheduleDailyEmail($notification, $addressee), // don't do this (the cronjob will handle them later)
default => $this->logger->debug('[NotificationMailer] No email preference set for notification type', [ default => $this->logger->debug('[NotificationMailer] No email preference set for notification type', [
'notification_id' => $notification->getId(), 'notification_id' => $notification->getId(),
'addressee_email' => $addressee->getEmail(), 'addressee_email' => $addressee->getEmail(),