Test Failed
Pull Request — develop (#47)
by Nuno
09:45 queued 05:19
created
src/Jobs/DeleteJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $index = $client->initIndex($this->searchables->first()->searchableAs());
54 54
 
55 55
         $result = $index->deleteBy([
56
-            'tagFilters' => $this->searchables->map(function ($searchable) {
56
+            'tagFilters' => $this->searchables->map(function($searchable) {
57 57
                 return ObjectIdEncrypter::encrypt($searchable);
58 58
             })->toArray(),
59 59
         ]);
Please login to merge, or discard this patch.
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/Console/Commands/OptimizeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         foreach ($searchableFinder->fromCommand($this) as $searchable) {
46 46
             $this->output->text('
Please login to merge, or discard this patch.