`return iterator_to_array($cursor)`

and split the cursor skipping and limiting on multiple lines.