From ea41c3cccc01690aeae75cb6b3c901d99334b60e Mon Sep 17 00:00:00 2001 From: pressatl Date: Fri, 20 Dec 2024 09:08:48 +0100 Subject: [PATCH] Finished --- src/Repository/MissionRepository.php | 46 ++++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Repository/MissionRepository.php b/src/Repository/MissionRepository.php index 782a0a9..f80af84 100644 --- a/src/Repository/MissionRepository.php +++ b/src/Repository/MissionRepository.php @@ -16,28 +16,28 @@ class MissionRepository extends ServiceEntityRepository parent::__construct($registry, Mission::class); } - // /** - // * @return Mission[] Returns an array of Mission objects - // */ - // public function findByExampleField($value): array - // { - // return $this->createQueryBuilder('m') - // ->andWhere('m.exampleField = :val') - // ->setParameter('val', $value) - // ->orderBy('m.id', 'ASC') - // ->setMaxResults(10) - // ->getQuery() - // ->getResult() - // ; - // } + /** + * @return Mission[] Returns an array of Mission objects + */ + public function findByExampleField($value): array + { + return $this->createQueryBuilder('m') + ->andWhere('m.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('m.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } - // public function findOneBySomeField($value): ?Mission - // { - // return $this->createQueryBuilder('m') - // ->andWhere('m.exampleField = :val') - // ->setParameter('val', $value) - // ->getQuery() - // ->getOneOrNullResult() - // ; - // } + public function findOneBySomeField($value): ?Mission + { + return $this->createQueryBuilder('m') + ->andWhere('m.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } }