From abd6d0056a44e475006a539d02da2b18bf2de2a8 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 26 Apr 2022 15:02:26 +0200 Subject: [PATCH] fix em --- docs/entities/em.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/entities/em.md b/docs/entities/em.md index f3e235b..bd63881 100644 --- a/docs/entities/em.md +++ b/docs/entities/em.md @@ -64,7 +64,7 @@ Events are dispatched before and after creation, update and deletion. All entiti ``` // src/EventSuscriber/MyEntityEventSubscriber.php -namespace App\EventSuscriber; +namespace App\EventSubscriber; use App\Core\Entity\EntityInterface; use App\Core\Event\EntityManager\EntityManagerEvent; @@ -73,14 +73,14 @@ use App\Entity\MyEntity; class MyEntityEventSubscriber extends EntityManagerEventSubscriber { - public function support(EntityInterface $entity) + public function supports(EntityInterface $entity): bool { return $entity instanceof MyEntity; } public function onCreate(EntityManagerEvent $event) { - if (!$this->support($event->getEntity())) { + if (!$this->supports($event->getEntity())) { return; } @@ -89,7 +89,7 @@ class MyEntityEventSubscriber extends EntityManagerEventSubscriber public function onUpdate(EntityManagerEvent $event) { - if (!$this->support($event->getEntity())) { + if (!$this->supports($event->getEntity())) { return; } @@ -98,7 +98,7 @@ class MyEntityEventSubscriber extends EntityManagerEventSubscriber public function onDelete(EntityManagerEvent $event) { - if (!$this->support($event->getEntity())) { + if (!$this->supports($event->getEntity())) { return; } @@ -107,7 +107,7 @@ class MyEntityEventSubscriber extends EntityManagerEventSubscriber public function onPreCreate(EntityManagerEvent $event) { - if (!$this->support($event->getEntity())) { + if (!$this->supports($event->getEntity())) { return; } @@ -116,7 +116,7 @@ class MyEntityEventSubscriber extends EntityManagerEventSubscriber public function onPreUpdate(EntityManagerEvent $event) { - if (!$this->support($event->getEntity())) { + if (!$this->supports($event->getEntity())) { return; } @@ -125,7 +125,7 @@ class MyEntityEventSubscriber extends EntityManagerEventSubscriber public function onPreDelete(EntityManagerEvent $event) { - if (!$this->support($event->getEntity())) { + if (!$this->supports($event->getEntity())) { return; }