| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | public function findFirstTodoEvent($failed = false, array $eventTypeIncluded = [], array $eventTypeExcluded = []) |
||
| 21 | { |
||
| 22 | $qb = $this->createQueryBuilder(); |
||
| 23 | $qb->field('failed')->equals($failed); |
||
| 24 | |||
| 25 | if (!empty($eventTypeIncluded)) { |
||
| 26 | $qb->field('originalName')->in($eventTypeIncluded); |
||
| 27 | } |
||
| 28 | |||
| 29 | if (!empty($eventTypeExcluded)) { |
||
| 30 | $qb->field('originalName')->notIn($eventTypeExcluded); |
||
| 31 | } |
||
| 32 | |||
| 33 | $qb->sort('createdAt', 'asc'); |
||
| 34 | |||
| 35 | return $qb->getQuery()->getSingleResult(); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |