Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
23 | public function getPreviousSprint() |
||
24 | { |
||
25 | return $this->createQueryBuilder('s') |
||
26 | ->where('s.endedAt <= :now') |
||
27 | ->orderBy('s.endedAt', 'DESC') |
||
28 | ->setParameters(['now' => (new \DateTime())->format('Y-m-d H:i:s')]) |
||
29 | ->getQuery() |
||
30 | ->setMaxResults(1) |
||
31 | ->getOneOrNullResult(); |
||
32 | } |
||
46 | } |