Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -12,33 +12,24 @@ namespace App\Repository;
use App\Entity\Project;
use App\Entity\ProjectRate;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\ORMException;
/**
* @extends \Doctrine\ORM\EntityRepository<ProjectRate>
*/
class ProjectRateRepository extends EntityRepository
{
public function saveRate(ProjectRate $rate)
public function saveRate(ProjectRate $rate): void
{
$entityManager = $this->getEntityManager();
$entityManager->persist($rate);
$entityManager->flush();
}
public function deleteRate(ProjectRate $rate)
public function deleteRate(ProjectRate $rate): void
{
$em = $this->getEntityManager();
$em->beginTransaction();
try {
$em->remove($rate);
$em->flush();
$em->commit();
} catch (ORMException $ex) {
$em->rollback();
throw $ex;
}
$entityManager = $this->getEntityManager();
$entityManager->remove($rate);
$entityManager->flush();
}
/**