From 95e878c45667006d07b3d0d5709ccd4d766fad81 Mon Sep 17 00:00:00 2001 From: Sergio Mendolia Date: Fri, 13 Oct 2023 14:12:27 +0200 Subject: [PATCH] ci --- src/Twig/InlineEditGroup.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Twig/InlineEditGroup.php b/src/Twig/InlineEditGroup.php index 07292e4c..6c25c570 100644 --- a/src/Twig/InlineEditGroup.php +++ b/src/Twig/InlineEditGroup.php @@ -2,9 +2,7 @@ namespace App\Twig; -use App\Entity\Book; use App\Repository\BookRepository; -use Doctrine\ORM\AbstractQuery; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; @@ -35,7 +33,6 @@ class InlineEditGroup extends AbstractController public ?string $flashMessage = null; - #[LiveAction] public function activateEditing(): void { @@ -48,7 +45,6 @@ public function activateEditing(): void #[LiveAction] public function save(BookRepository $bookRepository, EntityManagerInterface $entityManager): void { - $qb = $bookRepository->createQueryBuilder('book') ->select('book'); $qb->andWhere('JSON_CONTAINS(lower(book.'.$this->field.'), :value)=1'); @@ -60,13 +56,13 @@ public function save(BookRepository $bookRepository, EntityManagerInterface $ent switch ($this->field) { case 'authors': $book->removeAuthor($this->existingValue); - if($this->fieldValue !== ''){ + if ($this->fieldValue !== '') { $book->addAuthor($this->fieldValue); } break; case 'tags': $book->removeTag($this->existingValue); - if($this->fieldValue !== ''){ + if ($this->fieldValue !== '') { $book->addTag($this->fieldValue); } break;