Test Failed
Branch develop (dd818d)
by Nuno
03:56
created
src/Searchable/Aggregator.php 1 patch
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -148,8 +148,7 @@  discard block
 block discarded – undo
148 148
             throw new ModelNotDefinedInAggregatorException();
149 149
         }
150 150
 
151
-        return method_exists($this->model, 'toSearchableArray') ? $this->model->toSearchableArray() :
152
-            $this->model->toArray();
151
+        return method_exists($this->model, 'toSearchableArray') ? $this->model->toSearchableArray() : $this->model->toArray();
153 152
     }
154 153
 
155 154
     /**
@@ -165,9 +164,9 @@  discard block
 block discarded – undo
165 164
             $softDeletes =
166 165
                 in_array(SoftDeletes::class, class_uses_recursive($model)) && config('scout.soft_delete', false);
167 166
 
168
-            $instance->newQuery()->when($softDeletes, function ($query) {
167
+            $instance->newQuery()->when($softDeletes, function($query) {
169 168
                 $query->withTrashed();
170
-            })->orderBy($instance->getKeyName())->get()->map(function ($model) {
169
+            })->orderBy($instance->getKeyName())->get()->map(function($model) {
171 170
                 return static::create($model);
172 171
             })->searchable();
173 172
         }
@@ -183,7 +182,7 @@  discard block
 block discarded – undo
183 182
         foreach ((new static)->getModels() as $model) {
184 183
             $instance = new $model;
185 184
 
186
-            $instance->newQuery()->orderBy($instance->getKeyName())->get()->map(function ($model) {
185
+            $instance->newQuery()->orderBy($instance->getKeyName())->get()->map(function($model) {
187 186
                 return static::create($model);
188 187
             })->unsearchable();
189 188
         }
@@ -200,7 +199,7 @@  discard block
 block discarded – undo
200 199
             $softDeletes =
201 200
                 in_array(SoftDeletes::class, class_uses_recursive($model), true) && config('scout.soft_delete', false);
202 201
 
203
-            $count += $model::query()->when($softDeletes, function ($query) {
202
+            $count += $model::query()->when($softDeletes, function($query) {
204 203
                 $query->withTrashed();
205 204
             })->count();
206 205
         }
Please login to merge, or discard this patch.
src/Jobs/UpdateJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
     {
118 118
         $class = get_class($searchable->getModel());
119 119
 
120
-        if (! array_key_exists($class, $this->splittables)) {
120
+        if ( ! array_key_exists($class, $this->splittables)) {
121 121
             $this->splittables[$class] = false;
122 122
 
123 123
             foreach ($searchable->toSearchableArray() as $key => $value) {
Please login to merge, or discard this patch.
src/Settings/LocalFactory.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -261,8 +261,7 @@
 block discarded – undo
261 261
                 throw tap(new ModelNotFoundException())->setModel($searchable);
262 262
             }
263 263
 
264
-            $attributes = method_exists($instance, 'toSearchableArray') ? $instance->toSearchableArray() :
265
-                $instance->toArray();
264
+            $attributes = method_exists($instance, 'toSearchableArray') ? $instance->toSearchableArray() : $instance->toArray();
266 265
         }
267 266
 
268 267
         return $attributes;
Please login to merge, or discard this patch.
src/Console/Commands/OptimizeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         foreach ($searchableFinder->fromCommand($this) as $searchable) {
47 47
             $this->output->text('
Please login to merge, or discard this patch.