| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 42 | 1 | public function getList(?int $limit, ?int $offset) : array |
|
| 43 | { |
||
| 44 | 1 | $qb = $this->getEntityManager() |
|
| 45 | 1 | ->createQueryBuilder(); |
|
| 46 | |||
| 47 | 1 | $qb->select('entry') |
|
| 48 | 1 | ->from(Entry::class, 'entry') |
|
| 49 | 1 | ->orderBy('entry.createdAt', 'DESC'); |
|
| 50 | |||
| 51 | 1 | return $qb->getQuery() |
|
| 52 | 1 | ->setMaxResults($limit) |
|
| 53 | 1 | ->setFirstResult($offset) |
|
| 54 | 1 | ->getResult(); |
|
| 55 | } |
||
| 57 |