| Total Complexity | 7 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class ReadTopicSubscriber implements EventSubscriberInterface |
||
| 14 | { |
||
| 15 | private Security $security; |
||
| 16 | private EntityManagerInterface $em; |
||
| 17 | |||
| 18 | public function __construct(Security $security, EntityManagerInterface $em) |
||
| 19 | { |
||
| 20 | $this->security = $security; |
||
| 21 | $this->em = $em; |
||
| 22 | } |
||
| 23 | |||
| 24 | public static function getSubscribedEvents(): array |
||
| 25 | { |
||
| 26 | return [ |
||
| 27 | KernelEvents::REQUEST => ['setRead', EventPrioritiesAlias::POST_READ], |
||
| 28 | ]; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param RequestEvent $event |
||
| 33 | */ |
||
| 34 | public function setRead(RequestEvent $event) |
||
| 50 | } |
||
| 51 | } |
||
| 52 | } |
||
| 54 |