From 414e7f1512d0e2fca42de0624ffafcbac7bd8b62 Mon Sep 17 00:00:00 2001 From: Jeppe Krogh Date: Wed, 13 Dec 2023 12:42:32 +0100 Subject: [PATCH] Reverted milestoneRepository to versionRepository --- src/Repository/MilestoneRepository.php | 41 -------------------------- src/Repository/VersionRepository.php | 41 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 41 deletions(-) delete mode 100644 src/Repository/MilestoneRepository.php create mode 100644 src/Repository/VersionRepository.php diff --git a/src/Repository/MilestoneRepository.php b/src/Repository/MilestoneRepository.php deleted file mode 100644 index 4fecf627..00000000 --- a/src/Repository/MilestoneRepository.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * @method Milestone|null find($id, $lockMode = null, $lockVersion = null) - * @method Milestone|null findOneBy(array $criteria, array $orderBy = null) - * @method Milestone[] findAll() - * @method Milestone[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ -class MilestoneRepository extends ServiceEntityRepository -{ - public function __construct(ManagerRegistry $registry) - { - parent::__construct($registry, Milestone::class); - } - - public function save(Milestone $entity, bool $flush = false): void - { - $this->getEntityManager()->persist($entity); - - if ($flush) { - $this->getEntityManager()->flush(); - } - } - - public function remove(Milestone $entity, bool $flush = false): void - { - $this->getEntityManager()->remove($entity); - - if ($flush) { - $this->getEntityManager()->flush(); - } - } -} diff --git a/src/Repository/VersionRepository.php b/src/Repository/VersionRepository.php new file mode 100644 index 00000000..19195d95 --- /dev/null +++ b/src/Repository/VersionRepository.php @@ -0,0 +1,41 @@ + + * + * @method Version|null find($id, $lockMode = null, $lockVersion = null) + * @method Version|null findOneBy(array $criteria, array $orderBy = null) + * @method Version[] findAll() + * @method Version[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class VersionRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Version::class); + } + + public function save(Version $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(Version $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } +}