@@ -124,14 +124,14 @@ |
||
| 124 | 124 | // loop thru, chunk by chunk, to reduce chances of exhausting memory |
| 125 | 125 | $sourceEntityInstance->chunk( |
| 126 | 126 | 5000, |
| 127 | - function ($results) use ($isvalid, &$skip, &$resultSet, &$rawCount, $rawTop) { |
|
| 127 | + function($results) use ($isvalid, &$skip, &$resultSet, &$rawCount, $rawTop) { |
|
| 128 | 128 | // apply filter |
| 129 | 129 | $results = $results->filter($isvalid); |
| 130 | 130 | // need to iterate through full result set to find count of items matching filter, |
| 131 | 131 | // so we can't bail out early |
| 132 | 132 | $rawCount += $results->count(); |
| 133 | 133 | // now bolt on filtrate to accumulating result set if we haven't accumulated enough bitz |
| 134 | - if ($rawTop > $resultSet->count() + $skip) { |
|
| 134 | + if ($rawTop > $resultSet->count()+$skip) { |
|
| 135 | 135 | $resultSet = collect(array_merge($resultSet->all(), $results->all())); |
| 136 | 136 | $sliceAmount = min($skip, $resultSet->count()); |
| 137 | 137 | $resultSet = $resultSet->slice($sliceAmount); |
@@ -184,6 +184,7 @@ discard block |
||
| 184 | 184 | * @param mixed $orderBy sorted order if we want to get the data in some specific order |
| 185 | 185 | * @param int $top number of records which need to be skip |
| 186 | 186 | * @param String $skip value indicating what records to skip |
| 187 | + * @param SkipTokenInfo $skipToken |
|
| 187 | 188 | * |
| 188 | 189 | * @return QueryResult |
| 189 | 190 | * |
@@ -362,6 +363,7 @@ discard block |
||
| 362 | 363 | |
| 363 | 364 | /** |
| 364 | 365 | * @param $sourceEntityInstance |
| 366 | + * @param Model $checkInstance |
|
| 365 | 367 | * @throws ODataException |
| 366 | 368 | */ |
| 367 | 369 | private function checkAuth($sourceEntityInstance, $checkInstance = null) |