Test Failed
Pull Request — master (#80)
by Alex
02:56
created
src/Query/LaravelReadQuery.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             foreach ($parameters as $name => $line) {
114 114
                 $processed[$name] = ['direction' => $line['direction'], 'value' => $line['value']];
115 115
                 $sourceEntityInstance = $sourceEntityInstance
116
-                    ->orWhere(function ($query) use ($processed) {
116
+                    ->orWhere(function($query) use ($processed) {
117 117
                         foreach ($processed as $key => $proc) {
118 118
                             $query->where($key, $proc['direction'], $proc['value']);
119 119
                         }
@@ -156,14 +156,14 @@  discard block
 block discarded – undo
156 156
             // loop thru, chunk by chunk, to reduce chances of exhausting memory
157 157
             $sourceEntityInstance->chunk(
158 158
                 5000,
159
-                function ($results) use ($isvalid, &$skip, &$resultSet, &$rawCount, $rawTop) {
159
+                function($results) use ($isvalid, &$skip, &$resultSet, &$rawCount, $rawTop) {
160 160
                     // apply filter
161 161
                     $results = $results->filter($isvalid);
162 162
                     // need to iterate through full result set to find count of items matching filter,
163 163
                     // so we can't bail out early
164 164
                     $rawCount += $results->count();
165 165
                     // now bolt on filtrate to accumulating result set if we haven't accumulated enough bitz
166
-                    if ($rawTop > $resultSet->count() + $skip) {
166
+                    if ($rawTop > $resultSet->count()+$skip) {
167 167
                         $resultSet = collect(array_merge($resultSet->all(), $results->all()));
168 168
                         $sliceAmount = min($skip, $resultSet->count());
169 169
                         $resultSet = $resultSet->slice($sliceAmount);
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         if (QueryType::COUNT() == $queryType || QueryType::ENTITIES_WITH_COUNT() == $queryType) {
202 202
             $result->count = $resultCount;
203 203
         }
204
-        $hazMore = $bulkSetCount > $skip + count($resultSet);
204
+        $hazMore = $bulkSetCount > $skip+count($resultSet);
205 205
         $result->hasMore = $hazMore;
206 206
         return $result;
207 207
     }
Please login to merge, or discard this patch.