| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function findRecentEvents(int $offsetEventId, int $limit = 0): ?array |
||
| 40 | { |
||
| 41 | $qb = $this->getQueryBuilder('e'); |
||
| 42 | $qb |
||
| 43 | ->where($qb->expr()->gt('e.id', $offsetEventId)) |
||
| 44 | ->orderBy('e.id') |
||
| 45 | ; |
||
| 46 | |||
| 47 | if ($limit) { |
||
| 48 | $qb->setMaxResults($limit); |
||
| 49 | } |
||
| 50 | |||
| 51 | return $qb->getQuery()->getResult(); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |