| 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 |
||
| 42 | #[ReadOperation] |
||
| 43 | 10 | public function next(WalkCursor $cursor): WalkCursor |
|
| 44 | { |
||
| 45 | 10 | $cursor = clone $cursor; |
|
| 46 | /** @var Limitable&ReadCommandInterface<ConnectionInterface, R> $query */ |
||
| 47 | 10 | $query = $cursor->query; |
|
| 48 | |||
| 49 | 10 | $query->offset($cursor->cursor); |
|
| 50 | 10 | $cursor->cursor += $query->getLimit(); |
|
| 51 | 10 | $cursor->entities = $query->all(); |
|
| 52 | |||
| 53 | 10 | if ($cursor->entities instanceof CollectionInterface) { |
|
| 54 | $cursor->entities = $cursor->entities->all(); |
||
| 55 | } |
||
| 56 | |||
| 57 | 10 | return $cursor; |
|
| 58 | } |
||
| 60 |