From 54903e2ad34b46f2d15409abf43440756ab03411 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 13 Jan 2017 02:16:50 +0300 Subject: [PATCH] New PHP 7.1 type hints for Event Listeners. --- .../EventListener/UserSubscribersUpdatedListener.php | 2 +- .../PointToolsBundle/EventListener/UsersRenamedListener.php | 2 +- .../EventListener/UsersUpdatedSubscriber.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/EventListener/UserSubscribersUpdatedListener.php b/src/Skobkin/Bundle/PointToolsBundle/EventListener/UserSubscribersUpdatedListener.php index 987898d..20aa2dd 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/EventListener/UserSubscribersUpdatedListener.php +++ b/src/Skobkin/Bundle/PointToolsBundle/EventListener/UserSubscribersUpdatedListener.php @@ -23,7 +23,7 @@ class UserSubscribersUpdatedListener $this->notifier = $notifier; } - public function onAppUserSubscribersUpdated(UserSubscribersUpdatedEvent $event) + public function onAppUserSubscribersUpdated(UserSubscribersUpdatedEvent $event): void { $this->notifier->sendUserSubscribersUpdatedNotification($event->getUser(), $event->getSubscribedUsers(), $event->getUnsubscribedUsers()); } diff --git a/src/Skobkin/Bundle/PointToolsBundle/EventListener/UsersRenamedListener.php b/src/Skobkin/Bundle/PointToolsBundle/EventListener/UsersRenamedListener.php index fd4ae1c..23cbf70 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/EventListener/UsersRenamedListener.php +++ b/src/Skobkin/Bundle/PointToolsBundle/EventListener/UsersRenamedListener.php @@ -23,7 +23,7 @@ class UsersRenamedListener $this->notifier = $notifier; } - public function onAppUsersRenamed(UsersRenamedEvent $event) + public function onAppUsersRenamed(UsersRenamedEvent $event): void { $this->notifier->sendUsersRenamedNotification($event->getRenames()); } diff --git a/src/Skobkin/Bundle/PointToolsBundle/EventListener/UsersUpdatedSubscriber.php b/src/Skobkin/Bundle/PointToolsBundle/EventListener/UsersUpdatedSubscriber.php index 85ac976..01a36e5 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/EventListener/UsersUpdatedSubscriber.php +++ b/src/Skobkin/Bundle/PointToolsBundle/EventListener/UsersUpdatedSubscriber.php @@ -36,7 +36,7 @@ class UsersUpdatedSubscriber implements EventSubscriber $this->eventDispatcher = $eventDispatcher; } - public function getSubscribedEvents() + public function getSubscribedEvents(): array { return [ 'preUpdate', @@ -44,7 +44,7 @@ class UsersUpdatedSubscriber implements EventSubscriber ]; } - public function preUpdate(PreUpdateEventArgs $event) + public function preUpdate(PreUpdateEventArgs $event): void { /** @var User $entity */ $entity = $event->getObject(); @@ -58,7 +58,7 @@ class UsersUpdatedSubscriber implements EventSubscriber } } - public function postFlush(PostFlushEventArgs $event) + public function postFlush(PostFlushEventArgs $event): void { if (0 !== count($this->renames)) { // Creating event for dispatch