| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function removeAll(?DateTime $dateTime): void { |
||
| 34 | $qb = $this->em->createQueryBuilder() |
||
| 35 | ->delete(FreeTimespan::class, 't'); |
||
| 36 | |||
| 37 | if($dateTime !== null) { |
||
| 38 | $qb->where('t.date = :date') |
||
| 39 | ->setParameter('date', $dateTime); |
||
| 40 | } |
||
| 41 | |||
| 42 | $qb |
||
| 43 | ->getQuery() |
||
| 44 | ->execute(); |
||
| 45 | |||
| 46 | $this->flushIfNotInTransaction(); |
||
| 47 | } |
||
| 59 | } |