src/Notification/EventSubscriber/LogSentNotificationSubscriber.php line 43
<?phpdeclare(strict_types=1);/*** Copyright (c) 2021 TECLA Consulting Group oü.* All rights reserved.** This unpublished material is proprietary to TECLA Consulting Group oü.* All rights reserved. The methods and* techniques described herein are considered trade secrets* and/or confidential. Reproduction or distribution, in whole* or in part, is forbidden except by express written permission* of TECLA Consulting Group oü.** @author Matúš Sýkorjak <matus@tecla.no>* @copyright 2021 TECLA Consulting Group oü*/namespace App\Notification\EventSubscriber;use App\Notification\Event\Notification\SentEvent;use App\Notification\Service\NotificationLogServiceInterface;use JetBrains\PhpStorm\ArrayShape;use Symfony\Component\EventDispatcher\EventSubscriberInterface;final class LogSentNotificationSubscriber implements EventSubscriberInterface{private NotificationLogServiceInterface $service;public function __construct(NotificationLogServiceInterface $service){$this->service = $service;}#[ArrayShape([SentEvent::class => 'string'])]public static function getSubscribedEvents(): array{return [SentEvent::class => 'onSent',];}public function onSent(SentEvent $event): void{$this->service->create($event->getNotification());}}