Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2.0054 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | #[ReadOperation] |
||
38 | 10 | public function next(WalkCursor $cursor): WalkCursor |
|
39 | { |
||
40 | 10 | $cursor = clone $cursor; |
|
41 | /** @var Limitable&ReadCommandInterface $query */ |
||
42 | 10 | $query = $cursor->query; |
|
43 | |||
44 | 10 | $query->offset($cursor->cursor); |
|
45 | 10 | $cursor->cursor += $query->getLimit(); |
|
46 | 10 | $cursor->entities = $query->all(); |
|
47 | |||
48 | 10 | if ($cursor->entities instanceof CollectionInterface) { |
|
49 | $cursor->entities = $cursor->entities->all(); |
||
50 | } |
||
51 | |||
52 | 10 | return $cursor; |
|
53 | } |
||
55 |