mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-02-28 19:19:41 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -25,7 +25,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
public function __construct(private readonly Security $security, private readonly TranslatorInterface $translator, private readonly \Twig\Environment $engine, private readonly NotificationPersisterInterface $notificationPersister) {}
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
public static function getSubscribedEvents(): array
|
||||
{
|
||||
return [
|
||||
'workflow.accompanying_period_lifecycle.entered' => [
|
||||
@@ -56,7 +56,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface
|
||||
}
|
||||
}
|
||||
|
||||
private function generateNotificationToUser(AccompanyingPeriod $period)
|
||||
private function generateNotificationToUser(AccompanyingPeriod $period): void
|
||||
{
|
||||
$notification = new Notification();
|
||||
|
||||
@@ -78,7 +78,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface
|
||||
$this->notificationPersister->persist($notification);
|
||||
}
|
||||
|
||||
private function onPeriodConfirmed(AccompanyingPeriod $period)
|
||||
private function onPeriodConfirmed(AccompanyingPeriod $period): void
|
||||
{
|
||||
if ($period->getUser() instanceof User
|
||||
&& $period->getUser() !== $this->security->getUser()) {
|
||||
|
||||
Reference in New Issue
Block a user