From f7d9551dc13e5131d445b5618875a02b713c95ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 22 Apr 2022 11:41:38 +0200 Subject: [PATCH] fix cs --- ...NotificationOnTerminateEventSubscriber.php | 12 ++++++++++-- .../Notification/NotificationPersister.php | 19 ++++++++++++++----- .../NotificationPersisterInterface.php | 15 ++++++++++++--- ...ficationOnTerminateEventSubscriberTest.php | 15 ++++++++++++++- .../Events/UserRefEventSubscriber.php | 4 +--- .../Entity/AccompanyingPeriod/Comment.php | 4 ++-- 6 files changed, 53 insertions(+), 16 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php b/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php index 2739930f5..1f19def23 100644 --- a/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php +++ b/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php @@ -1,5 +1,14 @@ [ ['onKernelTerminate', 1024], // we must ensure that the priority is before sending email - ] + ], ]; } diff --git a/src/Bundle/ChillMainBundle/Notification/NotificationPersister.php b/src/Bundle/ChillMainBundle/Notification/NotificationPersister.php index b8bd132ed..d426e3cd7 100644 --- a/src/Bundle/ChillMainBundle/Notification/NotificationPersister.php +++ b/src/Bundle/ChillMainBundle/Notification/NotificationPersister.php @@ -1,5 +1,14 @@ waitingNotifications[] = $notification; - } - /** * @return array|Notification[] */ @@ -20,4 +24,9 @@ class NotificationPersister implements NotificationPersisterInterface { return $this->waitingNotifications; } + + public function persist(Notification $notification): void + { + $this->waitingNotifications[] = $notification; + } } diff --git a/src/Bundle/ChillMainBundle/Notification/NotificationPersisterInterface.php b/src/Bundle/ChillMainBundle/Notification/NotificationPersisterInterface.php index a87b5f90a..da98e305b 100644 --- a/src/Bundle/ChillMainBundle/Notification/NotificationPersisterInterface.php +++ b/src/Bundle/ChillMainBundle/Notification/NotificationPersisterInterface.php @@ -1,11 +1,20 @@