From 491570a21caca71df44dfbe7a1a2b1448aa895d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 5 Oct 2022 14:46:03 +0200 Subject: [PATCH] [export] Fixed: the scope aggregator (accompanying course) group by period's scope (and the label didn't show this) + extract ScopeRepository and create ScopeRepositoryInterface --- .../Repository/ScopeRepository.php | 7 +++-- .../Repository/ScopeRepositoryInterface.php | 28 +++++++++++++++++++ .../ScopeAggregator.php | 2 +- .../translations/messages.fr.yml | 3 +- 4 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 src/Bundle/ChillMainBundle/Repository/ScopeRepositoryInterface.php diff --git a/src/Bundle/ChillMainBundle/Repository/ScopeRepository.php b/src/Bundle/ChillMainBundle/Repository/ScopeRepository.php index 5b3efe658..6336addbd 100644 --- a/src/Bundle/ChillMainBundle/Repository/ScopeRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/ScopeRepository.php @@ -14,9 +14,10 @@ namespace Chill\MainBundle\Repository; use Chill\MainBundle\Entity\Scope; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; +use Doctrine\ORM\QueryBuilder; use Doctrine\Persistence\ObjectRepository; -final class ScopeRepository implements ObjectRepository +final class ScopeRepository implements ScopeRepositoryInterface { private EntityRepository $repository; @@ -25,7 +26,7 @@ final class ScopeRepository implements ObjectRepository $this->repository = $entityManager->getRepository(Scope::class); } - public function createQueryBuilder($alias, $indexBy = null) + public function createQueryBuilder($alias, $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); } @@ -59,7 +60,7 @@ final class ScopeRepository implements ObjectRepository return $this->repository->findOneBy($criteria, $orderBy); } - public function getClassName() + public function getClassName(): string { return Scope::class; } diff --git a/src/Bundle/ChillMainBundle/Repository/ScopeRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/ScopeRepositoryInterface.php new file mode 100644 index 000000000..1764db8d3 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Repository/ScopeRepositoryInterface.php @@ -0,0 +1,28 @@ +