Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | 4 | public function take($offset, $limit) |
|
34 | { |
||
35 | 4 | $qb = clone $this->qb; |
|
36 | 4 | $results = function ($offset, $limit) use ($qb) { |
|
37 | return $qb |
||
38 | 4 | ->setFirstResult($offset) |
|
39 | 4 | ->setMaxResults($limit) |
|
40 | 4 | ->execute() |
|
41 | 4 | ->fetchAll(); |
|
42 | 4 | }; |
|
43 | |||
44 | 4 | return new CallbackPage($results, [$this, 'count'], $offset, $limit); |
|
45 | } |
||
46 | |||
75 |