From d6b1216021c3e4baeda76baf355de3553455e617 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 21 Nov 2023 15:10:14 +0100 Subject: [PATCH] rename methods for more clarity --- .../ChillMainBundle/Controller/NewsItemHistoryController.php | 4 ++-- src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php b/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php index 8c645828b..ff7adf818 100644 --- a/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php +++ b/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php @@ -34,8 +34,8 @@ class NewsItemHistoryController extends AbstractController public function listAction(Request $request): Response { $filter = $this->buildFilterOrder(false); - $total = $this->newsItemRepository->countAllFilteredByUser($filter->getQueryString()); - $newsItems = $this->newsItemRepository->findAllFilteredByUser($filter->getQueryString()); + $total = $this->newsItemRepository->countAllFilteredBySearchTerm($filter->getQueryString()); + $newsItems = $this->newsItemRepository->findAllFilteredBySearchTerm($filter->getQueryString()); $pagination = $this->paginatorFactory->create($total); diff --git a/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php b/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php index 88b597647..44e1f2d39 100644 --- a/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php @@ -71,7 +71,7 @@ class NewsItemRepository implements ObjectRepository return $qb; } - public function findAllFilteredByUser(string $pattern = null) + public function findAllFilteredBySearchTerm(string $pattern = null) { $qb = $this->buildBaseQuery($pattern); $qb->addOrderBy('n.startDate', 'DESC') @@ -97,7 +97,7 @@ class NewsItemRepository implements ObjectRepository ->getResult(); } - public function countAllFilteredByUser(string $pattern = null) + public function countAllFilteredBySearchTerm(string $pattern = null) { $qb = $this->buildBaseQuery($pattern);