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 | 4 | public function getList(?int $limit, ?int $offset) : array |
|
43 | { |
||
44 | 4 | $qb = $this->getEntityManager() |
|
45 | 4 | ->createQueryBuilder(); |
|
46 | |||
47 | 4 | $qb->select('entry') |
|
48 | 4 | ->from(Entry::class, 'entry') |
|
49 | 4 | ->orderBy('entry.createdAt', 'DESC'); |
|
50 | |||
51 | 4 | return $qb->getQuery() |
|
52 | 4 | ->setMaxResults($limit) |
|
53 | 4 | ->setFirstResult($offset) |
|
54 | 4 | ->getResult(); |
|
55 | } |
||
57 |