@@ -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); |
@@ -180,6 +180,7 @@ discard block |
||
180 | 180 | * @param mixed $orderBy sorted order if we want to get the data in some specific order |
181 | 181 | * @param int $top number of records which need to be skip |
182 | 182 | * @param String $skip value indicating what records to skip |
183 | + * @param \POData\UriProcessor\QueryProcessor\SkipTokenParser\SkipTokenInfo $skipToken |
|
183 | 184 | * |
184 | 185 | * @return QueryResult |
185 | 186 | * |
@@ -358,6 +359,7 @@ discard block |
||
358 | 359 | |
359 | 360 | /** |
360 | 361 | * @param $sourceEntityInstance |
362 | + * @param Model $checkInstance |
|
361 | 363 | * @throws ODataException |
362 | 364 | */ |
363 | 365 | private function checkAuth($sourceEntityInstance, $checkInstance = null) |