From 645d6b81652f552503f1360c3f872645f5af1d0a Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Mon, 11 Mar 2024 12:42:22 -0500 Subject: [PATCH] Minor: Format code --- src/CoreBundle/Controller/CourseController.php | 2 -- src/CoreBundle/Entity/ExtraField.php | 2 +- src/CoreBundle/Repository/Node/CourseRepository.php | 6 ++++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CoreBundle/Controller/CourseController.php b/src/CoreBundle/Controller/CourseController.php index 287380fec9..c72fcd91f3 100644 --- a/src/CoreBundle/Controller/CourseController.php +++ b/src/CoreBundle/Controller/CourseController.php @@ -7,7 +7,6 @@ declare(strict_types=1); namespace Chamilo\CoreBundle\Controller; use Chamilo\CoreBundle\Entity\Course; -use Chamilo\CoreBundle\Entity\CourseCategory; use Chamilo\CoreBundle\Entity\CourseRelUser; use Chamilo\CoreBundle\Entity\ExtraField; use Chamilo\CoreBundle\Entity\Session; @@ -711,7 +710,6 @@ class CourseController extends ToolBaseController AccessUrlHelper $accessUrlHelper, CourseRepository $courseRepository ): JsonResponse { - $searchTerm = $request->query->get('search', ''); $accessUrl = $accessUrlHelper->getCurrent(); diff --git a/src/CoreBundle/Entity/ExtraField.php b/src/CoreBundle/Entity/ExtraField.php index 51d7e6dafe..236fc5ddda 100644 --- a/src/CoreBundle/Entity/ExtraField.php +++ b/src/CoreBundle/Entity/ExtraField.php @@ -127,7 +127,7 @@ class ExtraField protected DateTime $createdAt; #[Groups(['extra_field:read'])] - #[ORM\Column(name: "auto_remove", type: "boolean", options: ["default" => false])] + #[ORM\Column(name: 'auto_remove', type: 'boolean', options: ['default' => false])] protected bool $autoRemove = false; public function __construct() diff --git a/src/CoreBundle/Repository/Node/CourseRepository.php b/src/CoreBundle/Repository/Node/CourseRepository.php index 4c732fc002..38707134e8 100644 --- a/src/CoreBundle/Repository/Node/CourseRepository.php +++ b/src/CoreBundle/Repository/Node/CourseRepository.php @@ -104,14 +104,16 @@ class CourseRepository extends ResourceRepository 'user' => $user, 'url' => $url, 'status' => $status, - ]); + ]) + ; if (!empty($keyword)) { $qb->andWhere($qb->expr()->orX( $qb->expr()->like('c.title', ':keyword'), $qb->expr()->like('c.code', ':keyword') )) - ->setParameter('keyword', '%'.$keyword.'%'); + ->setParameter('keyword', '%'.$keyword.'%') + ; } $query = $qb->getQuery();