Test Failed
Push — develop ( b968c4...88a30f )
by Nuno
04:27 queued 01:24
created
src/Searchable/Aggregator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $observer = tap(resolve(AggregatorObserver::class))->setAggregator(static::class, $models = $self->getModels());
60 60
 
61 61
         foreach ($models as $model) {
62
-            \Illuminate\Database\Eloquent\Builder::macro('getScoutKey', function () {
62
+            \Illuminate\Database\Eloquent\Builder::macro('getScoutKey', function() {
63 63
                 if ($this->model === null) {
64 64
                     throw new ModelNotDefinedInAggregatorException();
65 65
                 }
@@ -160,9 +160,9 @@  discard block
 block discarded – undo
160 160
 
161 161
             $softDeletes = in_array(SoftDeletes::class, class_uses_recursive($model)) && config('scout.soft_delete', false);
162 162
 
163
-            $instance->newQuery()->when($softDeletes, function ($query) {
163
+            $instance->newQuery()->when($softDeletes, function($query) {
164 164
                 $query->withTrashed();
165
-            })->orderBy($instance->getKeyName())->get()->map(function ($model) {
165
+            })->orderBy($instance->getKeyName())->get()->map(function($model) {
166 166
                 return (new static)->searchableWith($model);
167 167
             })->searchable();
168 168
         }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         foreach ((new static)->getModels() as $model) {
179 179
             $instance = new $model;
180 180
 
181
-            $instance->newQuery()->orderBy($instance->getKeyName())->get()->map(function ($model) {
181
+            $instance->newQuery()->orderBy($instance->getKeyName())->get()->map(function($model) {
182 182
                 return (new static)->searchableWith($model);
183 183
             })->unsearchable();
184 184
         }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         foreach ($this->getModels() as $model) {
195 195
             $softDeletes = in_array(SoftDeletes::class, class_uses_recursive($model), true) && config('scout.soft_delete', false);
196 196
 
197
-            $count += $model::query()->when($softDeletes, function ($query) {
197
+            $count += $model::query()->when($softDeletes, function($query) {
198 198
                 $query->withTrashed();
199 199
             })->count();
200 200
         }
Please login to merge, or discard this patch.