@@ -53,7 +53,7 @@ |
||
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 | ]); |
@@ -148,8 +148,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -117,7 +117,7 @@ |
||
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) { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | foreach ($searchableFinder->fromCommand($this) as $searchable) { |
46 | 46 | $this->output->text(' |