Total Complexity | 2 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
7 | class SprintRepository extends EntityRepository |
||
8 | { |
||
9 | public function getCurrentSprint() |
||
10 | { |
||
11 | $now = new \DateTime(); |
||
12 | return $this->createQueryBuilder('s') |
||
13 | ->where('s.beginAt <= :begin_at') |
||
14 | ->andWhere('s.endedAt >= :ended_at') |
||
15 | ->setParameters([ |
||
16 | 'begin_at' => $now->format('Y-m-d H:i:s'), |
||
17 | 'ended_at' => $now->format('Y-m-d H:i:s') |
||
18 | ]) |
||
19 | ->getQuery() |
||
20 | ->getOneOrNullResult(); |
||
21 | } |
||
22 | |||
23 | public function getSprintByPeriod(\DateTime $beginAt, \DateTime $endedAt) |
||
34 | } |
||
35 | } |