change method name

This commit is contained in:
Simon Vieille 2022-04-25 16:36:25 +02:00
parent 10128648d9
commit e8cd93a3ac
Signed by: deblan
GPG key ID: 579388D585F70417
4 changed files with 10 additions and 10 deletions

View file

@ -22,14 +22,14 @@ class CategoryEventSubscriber extends EntityManagerEventSubscriber
$this->slugify = $slugify;
}
public function support(EntityInterface $entity)
public function supports(EntityInterface $entity)
{
return $entity instanceof Category;
}
public function onPreUpdate(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}

View file

@ -39,14 +39,14 @@ class CommentEventSubscriber extends EntityManagerEventSubscriber
$this->siteRequest = $siteRequest;
}
public function support(EntityInterface $entity)
public function supports(EntityInterface $entity)
{
return $entity instanceof Comment;
}
public function onCreate(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}

View file

@ -29,14 +29,14 @@ class PostEventSubscriber extends EntityManagerEventSubscriber
$this->slugify = $slugify;
}
public function support(EntityInterface $entity)
public function supports(EntityInterface $entity)
{
return $entity instanceof Post;
}
public function onUpdate(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}
@ -45,7 +45,7 @@ class PostEventSubscriber extends EntityManagerEventSubscriber
public function onDelete(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}
@ -54,7 +54,7 @@ class PostEventSubscriber extends EntityManagerEventSubscriber
public function onPreUpdate(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}

View file

@ -35,14 +35,14 @@ class PostFollowEventSubscriber extends EntityManagerEventSubscriber
$this->siteRequest = $siteRequest;
}
public function support(EntityInterface $entity)
public function supports(EntityInterface $entity)
{
return $entity instanceof PostFollow;
}
public function onCreate(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}