Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioMendolia committed Oct 13, 2023
1 parent d26f70d commit 95e878c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Twig/InlineEditGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -35,7 +33,6 @@ class InlineEditGroup extends AbstractController

public ?string $flashMessage = null;


#[LiveAction]
public function activateEditing(): void
{
Expand All @@ -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');
Expand All @@ -60,13 +56,13 @@ public function save(BookRepository $bookRepository, EntityManagerInterface $ent
switch ($this->field) {
case 'authors':
$book->removeAuthor($this->existingValue);

Check failure on line 58 in src/Twig/InlineEditGroup.php

View workflow job for this annotation

GitHub Actions / symfony-tests

Cannot call method removeAuthor() on mixed.
if($this->fieldValue !== ''){
if ($this->fieldValue !== '') {
$book->addAuthor($this->fieldValue);

Check failure on line 60 in src/Twig/InlineEditGroup.php

View workflow job for this annotation

GitHub Actions / symfony-tests

Cannot call method addAuthor() on mixed.
}
break;
case 'tags':
$book->removeTag($this->existingValue);

Check failure on line 64 in src/Twig/InlineEditGroup.php

View workflow job for this annotation

GitHub Actions / symfony-tests

Cannot call method removeTag() on mixed.
if($this->fieldValue !== ''){
if ($this->fieldValue !== '') {
$book->addTag($this->fieldValue);

Check failure on line 66 in src/Twig/InlineEditGroup.php

View workflow job for this annotation

GitHub Actions / symfony-tests

Cannot call method addTag() on mixed.
}
break;
Expand Down

0 comments on commit 95e878c

Please sign in to comment.