mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
fix cs
This commit is contained in:
@@ -25,10 +25,10 @@ use Doctrine\Persistence\ObjectRepository;
|
||||
|
||||
final class AccompanyingPeriodWorkRepository implements ObjectRepository
|
||||
{
|
||||
private EntityRepository $repository;
|
||||
|
||||
private EntityManagerInterface $em;
|
||||
|
||||
private EntityRepository $repository;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager)
|
||||
{
|
||||
$this->em = $entityManager;
|
||||
@@ -84,7 +84,7 @@ final class AccompanyingPeriodWorkRepository implements ObjectRepository
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of accompanying period with a defined order:
|
||||
* Return a list of accompanying period with a defined order:.
|
||||
*
|
||||
* * first, opened works
|
||||
* * then, closed works
|
||||
@@ -96,7 +96,7 @@ final class AccompanyingPeriodWorkRepository implements ObjectRepository
|
||||
$rsm = new ResultSetMappingBuilder($this->em);
|
||||
$rsm->addRootEntityFromClassMetadata(AccompanyingPeriodWork::class, 'w');
|
||||
|
||||
$sql = "SELECT ${rsm} FROM chill_person_accompanying_period_work w
|
||||
$sql = "SELECT {$rsm} FROM chill_person_accompanying_period_work w
|
||||
WHERE accompanyingPeriod_id = :periodId
|
||||
ORDER BY
|
||||
CASE WHEN enddate IS NULL THEN '-infinity'::timestamp ELSE 'infinity'::timestamp END ASC,
|
||||
@@ -108,8 +108,7 @@ final class AccompanyingPeriodWorkRepository implements ObjectRepository
|
||||
$nq = $this->em->createNativeQuery($sql, $rsm)
|
||||
->setParameter('periodId', $period->getId(), Types::INTEGER)
|
||||
->setParameter('limit', $limit, Types::INTEGER)
|
||||
->setParameter('offset', $offset, Types::INTEGER)
|
||||
;
|
||||
->setParameter('offset', $offset, Types::INTEGER);
|
||||
|
||||
return $nq->getResult();
|
||||
}
|
||||
|
Reference in New Issue
Block a user