| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 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 | } |
||
| 35 | } |