From 03793d477f05c710576e0980a217657277b0e3c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 6 Dec 2023 18:11:39 +0100 Subject: [PATCH] chore: code cleanup --- src/Repository/LicenseRepository.php | 43 ------------------- src/Repository/PickupRepository.php | 43 ------------------- .../TrainingAttendanceRepository.php | 43 ------------------- src/Repository/UserRepository.php | 43 ------------------- 4 files changed, 172 deletions(-) diff --git a/src/Repository/LicenseRepository.php b/src/Repository/LicenseRepository.php index ee6599f..c8fee79 100644 --- a/src/Repository/LicenseRepository.php +++ b/src/Repository/LicenseRepository.php @@ -20,47 +20,4 @@ class LicenseRepository extends ServiceEntityRepository { parent::__construct($registry, License::class); } - - public function save(License $entity, bool $flush = false): void - { - $this->getEntityManager()->persist($entity); - - if ($flush) { - $this->getEntityManager()->flush(); - } - } - - public function remove(License $entity, bool $flush = false): void - { - $this->getEntityManager()->remove($entity); - - if ($flush) { - $this->getEntityManager()->flush(); - } - } - -// /** -// * @return License[] Returns an array of License objects -// */ -// public function findByExampleField($value): array -// { -// return $this->createQueryBuilder('l') -// ->andWhere('l.exampleField = :val') -// ->setParameter('val', $value) -// ->orderBy('l.id', 'ASC') -// ->setMaxResults(10) -// ->getQuery() -// ->getResult() -// ; -// } - -// public function findOneBySomeField($value): ?License -// { -// return $this->createQueryBuilder('l') -// ->andWhere('l.exampleField = :val') -// ->setParameter('val', $value) -// ->getQuery() -// ->getOneOrNullResult() -// ; -// } } diff --git a/src/Repository/PickupRepository.php b/src/Repository/PickupRepository.php index 88187a0..e8c0487 100644 --- a/src/Repository/PickupRepository.php +++ b/src/Repository/PickupRepository.php @@ -20,47 +20,4 @@ class PickupRepository extends ServiceEntityRepository { parent::__construct($registry, Pickup::class); } - - public function save(Pickup $entity, bool $flush = false): void - { - $this->getEntityManager()->persist($entity); - - if ($flush) { - $this->getEntityManager()->flush(); - } - } - - public function remove(Pickup $entity, bool $flush = false): void - { - $this->getEntityManager()->remove($entity); - - if ($flush) { - $this->getEntityManager()->flush(); - } - } - -// /** -// * @return Pickup[] Returns an array of Pickup objects -// */ -// public function findByExampleField($value): array -// { -// return $this->createQueryBuilder('p') -// ->andWhere('p.exampleField = :val') -// ->setParameter('val', $value) -// ->orderBy('p.id', 'ASC') -// ->setMaxResults(10) -// ->getQuery() -// ->getResult() -// ; -// } - -// public function findOneBySomeField($value): ?Pickup -// { -// return $this->createQueryBuilder('p') -// ->andWhere('p.exampleField = :val') -// ->setParameter('val', $value) -// ->getQuery() -// ->getOneOrNullResult() -// ; -// } } diff --git a/src/Repository/TrainingAttendanceRepository.php b/src/Repository/TrainingAttendanceRepository.php index cc608a3..4c0769f 100644 --- a/src/Repository/TrainingAttendanceRepository.php +++ b/src/Repository/TrainingAttendanceRepository.php @@ -20,47 +20,4 @@ class TrainingAttendanceRepository extends ServiceEntityRepository { parent::__construct($registry, TrainingAttendance::class); } - - public function save(TrainingAttendance $entity, bool $flush = false): void - { - $this->getEntityManager()->persist($entity); - - if ($flush) { - $this->getEntityManager()->flush(); - } - } - - public function remove(TrainingAttendance $entity, bool $flush = false): void - { - $this->getEntityManager()->remove($entity); - - if ($flush) { - $this->getEntityManager()->flush(); - } - } - -// /** -// * @return TrainingAttendance[] Returns an array of TrainingAttendance objects -// */ -// public function findByExampleField($value): array -// { -// return $this->createQueryBuilder('t') -// ->andWhere('t.exampleField = :val') -// ->setParameter('val', $value) -// ->orderBy('t.id', 'ASC') -// ->setMaxResults(10) -// ->getQuery() -// ->getResult() -// ; -// } - -// public function findOneBySomeField($value): ?TrainingAttendance -// { -// return $this->createQueryBuilder('t') -// ->andWhere('t.exampleField = :val') -// ->setParameter('val', $value) -// ->getQuery() -// ->getOneOrNullResult() -// ; -// } } diff --git a/src/Repository/UserRepository.php b/src/Repository/UserRepository.php index d1f2be2..86a987a 100644 --- a/src/Repository/UserRepository.php +++ b/src/Repository/UserRepository.php @@ -20,47 +20,4 @@ class UserRepository extends ServiceEntityRepository { parent::__construct($registry, User::class); } - - public function save(User $entity, bool $flush = false): void - { - $this->getEntityManager()->persist($entity); - - if ($flush) { - $this->getEntityManager()->flush(); - } - } - - public function remove(User $entity, bool $flush = false): void - { - $this->getEntityManager()->remove($entity); - - if ($flush) { - $this->getEntityManager()->flush(); - } - } - -// /** -// * @return User[] Returns an array of User objects -// */ -// public function findByExampleField($value): array -// { -// return $this->createQueryBuilder('u') -// ->andWhere('u.exampleField = :val') -// ->setParameter('val', $value) -// ->orderBy('u.id', 'ASC') -// ->setMaxResults(10) -// ->getQuery() -// ->getResult() -// ; -// } - -// public function findOneBySomeField($value): ?User -// { -// return $this->createQueryBuilder('u') -// ->andWhere('u.exampleField = :val') -// ->setParameter('val', $value) -// ->getQuery() -// ->getOneOrNullResult() -// ; -// } }