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:
@@ -29,28 +29,6 @@ final class AccompanyingPeriodWorkRepository implements ObjectRepository
|
||||
$this->repository = $entityManager->getRepository(AccompanyingPeriodWork::class);
|
||||
}
|
||||
|
||||
private function buildQueryNearEndDateByUser(User $user, DateTimeImmutable $since, DateTimeImmutable $until): QueryBuilder
|
||||
{
|
||||
$qb = $this->repository->createQueryBuilder('w');
|
||||
|
||||
$qb
|
||||
->join('w.accompanyingPeriod', 'period')
|
||||
->where(
|
||||
$qb->expr()->andX(
|
||||
$qb->expr()->eq('period.user', ':user'),
|
||||
$qb->expr()->gte('w.endDate', ':since'),
|
||||
$qb->expr()->lte('w.startDate', ':until')
|
||||
)
|
||||
)
|
||||
->setParameters([
|
||||
'user' => $user,
|
||||
'since' => $since,
|
||||
'until' => $until,
|
||||
]);
|
||||
|
||||
return $qb;
|
||||
}
|
||||
|
||||
public function countByAccompanyingPeriod(AccompanyingPeriod $period): int
|
||||
{
|
||||
return $this->repository->countByAccompanyingPeriod($period);
|
||||
@@ -152,4 +130,26 @@ final class AccompanyingPeriodWorkRepository implements ObjectRepository
|
||||
|
||||
return $qb;
|
||||
}
|
||||
|
||||
private function buildQueryNearEndDateByUser(User $user, DateTimeImmutable $since, DateTimeImmutable $until): QueryBuilder
|
||||
{
|
||||
$qb = $this->repository->createQueryBuilder('w');
|
||||
|
||||
$qb
|
||||
->join('w.accompanyingPeriod', 'period')
|
||||
->where(
|
||||
$qb->expr()->andX(
|
||||
$qb->expr()->eq('period.user', ':user'),
|
||||
$qb->expr()->gte('w.endDate', ':since'),
|
||||
$qb->expr()->lte('w.startDate', ':until')
|
||||
)
|
||||
)
|
||||
->setParameters([
|
||||
'user' => $user,
|
||||
'since' => $since,
|
||||
'until' => $until,
|
||||
]);
|
||||
|
||||
return $qb;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user