Skip to content

Commit

Permalink
Reverted milestoneRepository to versionRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
jeppekroghitk committed Dec 13, 2023
1 parent 73bc8e6 commit 414e7f1
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 41 deletions.
41 changes: 0 additions & 41 deletions src/Repository/MilestoneRepository.php

This file was deleted.

41 changes: 41 additions & 0 deletions src/Repository/VersionRepository.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace App\Repository;

use App\Entity\Version;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

/**
* @extends ServiceEntityRepository<Version>
*
* @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();
}
}
}

0 comments on commit 414e7f1

Please sign in to comment.