New PHP 7.1 type hints for Event Listeners.
This commit is contained in:
parent
a02250a8df
commit
54903e2ad3
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue