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