Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
56 | 4 | public function findAllWithLimitAndOffset(int $limit = 50, int $offset = null): array |
|
57 | { |
||
58 | // Doctrine can handle correctly only null limits, but not 0 |
||
59 | 4 | if (!$limit) { $limit = null; } |
|
60 | 4 | if (!$offset) { $offset = null; } |
|
61 | |||
62 | 4 | return $this->findBy( |
|
63 | 4 | [], |
|
64 | 4 | null, |
|
65 | $limit, |
||
66 | $offset |
||
67 | ); |
||
68 | } |
||
69 | |||
87 |