change method name

This commit is contained in:
Simon Vieille 2022-04-25 16:32:05 +02:00
parent 734a51891d
commit dd53e60eff
Signed by: deblan
GPG key ID: 579388D585F70417
6 changed files with 14 additions and 14 deletions

View file

@ -43,14 +43,14 @@ class MenuEventSubscriber extends EntityManagerEventSubscriber
$this->translator = $translator;
}
public function support(EntityInterface $entity)
public function supports(EntityInterface $entity): bool
{
return $entity instanceof Menu;
}
public function onPreUpdate(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}
@ -60,7 +60,7 @@ class MenuEventSubscriber extends EntityManagerEventSubscriber
public function onCreate(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}

View file

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

View file

@ -45,7 +45,7 @@ class NodeEventSubscriber extends EntityManagerEventSubscriber
$this->routeParameterSlugify = $routeParameterSlugify;
}
public function support(EntityInterface $entity)
public function supports(EntityInterface $entity): bool
{
return $entity instanceof Node;
}
@ -57,7 +57,7 @@ class NodeEventSubscriber extends EntityManagerEventSubscriber
public function onPreUpdate(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}
@ -159,7 +159,7 @@ class NodeEventSubscriber extends EntityManagerEventSubscriber
public function onDelete(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}

View file

@ -24,14 +24,14 @@ class BlockEventSubscriber extends EntityManagerEventSubscriber
$this->fileUpload = $fileUpload;
}
public function support(EntityInterface $entity)
public function supports(EntityInterface $entity): bool
{
return $entity instanceof Page;
}
public function onPreUpdate(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}

View file

@ -23,14 +23,14 @@ class PageEventSubscriber extends EntityManagerEventSubscriber
$this->fileUpload = $fileUpload;
}
public function support(EntityInterface $entity)
public function supports(EntityInterface $entity): bool
{
return $entity instanceof Page;
}
public function onPreUpdate(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}

View file

@ -27,14 +27,14 @@ class SiteEventSubscriber extends EntityManagerEventSubscriber
$this->cacheManager = $cacheManager;
}
public function support(EntityInterface $entity)
public function supports(EntityInterface $entity): bool
{
return $entity instanceof Node || $entity instanceof Menu || $entity instanceof Navigation;
}
public function onUpdate(EntityManagerEvent $event)
{
if (!$this->support($event->getEntity())) {
if (!$this->supports($event->getEntity())) {
return;
}