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