@@ -61,30 +61,30 @@ |
||
| 61 | 61 | */ |
| 62 | 62 | private function registerBinds(): void |
| 63 | 63 | { |
| 64 | - $this->app->bind(Algolia::class, function () { |
|
| 64 | + $this->app->bind(Algolia::class, function() { |
|
| 65 | 65 | return new Algolia($this->app); |
| 66 | 66 | }); |
| 67 | 67 | |
| 68 | 68 | $this->app->alias(Algolia::class, 'algolia'); |
| 69 | 69 | |
| 70 | - $this->app->singleton(EngineManager::class, function ($app) { |
|
| 70 | + $this->app->singleton(EngineManager::class, function($app) { |
|
| 71 | 71 | return new EngineManager($app); |
| 72 | 72 | }); |
| 73 | 73 | |
| 74 | 74 | $this->app->alias(EngineManager::class, \Laravel\Scout\EngineManager::class); |
| 75 | 75 | |
| 76 | - $this->app->bind(AlgoliaEngine::class, function (): AlgoliaEngine { |
|
| 76 | + $this->app->bind(AlgoliaEngine::class, function(): AlgoliaEngine { |
|
| 77 | 77 | return $this->app->make(\Laravel\Scout\EngineManager::class)->createAlgoliaDriver(); |
| 78 | 78 | }); |
| 79 | 79 | |
| 80 | 80 | $this->app->alias(AlgoliaEngine::class, 'algolia.engine'); |
| 81 | - $this->app->bind(SearchClient::class, function (): SearchClient { |
|
| 81 | + $this->app->bind(SearchClient::class, function(): SearchClient { |
|
| 82 | 82 | return $this->app->make('algolia.engine')->getClient(); |
| 83 | 83 | }); |
| 84 | 84 | |
| 85 | 85 | $this->app->alias(SearchClient::class, 'algolia.client'); |
| 86 | 86 | |
| 87 | - $this->app->bind(AnalyticsClient::class, function (): AnalyticsClient { |
|
| 87 | + $this->app->bind(AnalyticsClient::class, function(): AnalyticsClient { |
|
| 88 | 88 | return AnalyticsClient::create(config('scout.algolia.id'), config('scout.algolia.secret')); |
| 89 | 89 | }); |
| 90 | 90 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | { |
| 120 | 120 | $class = get_class($searchable->getModel()); |
| 121 | 121 | |
| 122 | - if (! array_key_exists($class, $this->splittables)) { |
|
| 122 | + if ( ! array_key_exists($class, $this->splittables)) { |
|
| 123 | 123 | $this->splittables[$class] = false; |
| 124 | 124 | |
| 125 | 125 | foreach ($searchable->toSearchableArray() as $key => $value) { |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $objects = $temp; |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | - return array_map(function ($object) use ($array) { |
|
| 179 | + return array_map(function($object) use ($array) { |
|
| 180 | 180 | return array_merge($array, $object); |
| 181 | 181 | }, $objects); |
| 182 | 182 | } |
@@ -149,8 +149,7 @@ discard block |
||
| 149 | 149 | throw new ModelNotDefinedInAggregatorException(); |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | - return method_exists($this->model, 'toSearchableArray') ? $this->model->toSearchableArray() : |
|
| 153 | - $this->model->toArray(); |
|
| 152 | + return method_exists($this->model, 'toSearchableArray') ? $this->model->toSearchableArray() : $this->model->toArray(); |
|
| 154 | 153 | } |
| 155 | 154 | |
| 156 | 155 | /** |
@@ -166,9 +165,9 @@ discard block |
||
| 166 | 165 | $softDeletes = |
| 167 | 166 | in_array(SoftDeletes::class, class_uses_recursive($model)) && config('scout.soft_delete', false); |
| 168 | 167 | |
| 169 | - $instance->newQuery()->when($softDeletes, function ($query) { |
|
| 168 | + $instance->newQuery()->when($softDeletes, function($query) { |
|
| 170 | 169 | $query->withTrashed(); |
| 171 | - })->orderBy($instance->getKeyName())->get()->map(function ($model) { |
|
| 170 | + })->orderBy($instance->getKeyName())->get()->map(function($model) { |
|
| 172 | 171 | return static::create($model); |
| 173 | 172 | })->searchable(); |
| 174 | 173 | } |
@@ -185,7 +184,7 @@ discard block |
||
| 185 | 184 | $softDeletes = |
| 186 | 185 | in_array(SoftDeletes::class, class_uses_recursive($model), true) && config('scout.soft_delete', false); |
| 187 | 186 | |
| 188 | - $count += $model::query()->when($softDeletes, function ($query) { |
|
| 187 | + $count += $model::query()->when($softDeletes, function($query) { |
|
| 189 | 188 | $query->withTrashed(); |
| 190 | 189 | })->count(); |
| 191 | 190 | } |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | foreach ($searchableFinder->fromCommand($this) as $searchable) { |
| 47 | 47 | $this->output->text(' |