@@ -12,7 +12,7 @@ |
||
12 | 12 | /** |
13 | 13 | * Create a new engine instance. |
14 | 14 | * |
15 | - * @param TeamTNT\TNTSearch\TNTSearch $tnt |
|
15 | + * @param TNTSearch $tnt |
|
16 | 16 | * |
17 | 17 | * @return void |
18 | 18 | */ |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | public function update($models) |
32 | 32 | { |
33 | 33 | $this->initIndex($models->first()); |
34 | - $models->each(function ($model) { |
|
34 | + $models->each(function($model) { |
|
35 | 35 | $searchableFields = $this->getSearchableFields($model); |
36 | 36 | |
37 | 37 | $this->tnt->selectIndex("{$model->searchableAs()}.index"); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | public function delete($models) |
55 | 55 | { |
56 | 56 | $this->initIndex($models->first()); |
57 | - $models->each(function ($model) { |
|
57 | + $models->each(function($model) { |
|
58 | 58 | $this->tnt->selectIndex("{$model->searchableAs()}.index"); |
59 | 59 | $index = $this->tnt->getIndex(); |
60 | 60 | $index->delete($model->id); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | protected function filters(Builder $builder) |
115 | 115 | { |
116 | - return collect($builder->wheres)->map(function ($value, $key) { |
|
116 | + return collect($builder->wheres)->map(function($value, $key) { |
|
117 | 117 | return $key.'='.$value; |
118 | 118 | })->values()->all(); |
119 | 119 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $model->getKeyName(), $keys |
137 | 137 | )->get()->keyBy($model->getKeyName()); |
138 | 138 | |
139 | - return collect($results['ids'])->map(function ($hit) use ($models) { |
|
139 | + return collect($results['ids'])->map(function($hit) use ($models) { |
|
140 | 140 | return $models[$hit]; |
141 | 141 | }); |
142 | 142 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | */ |
16 | 16 | public function register() |
17 | 17 | { |
18 | - $this->app[EngineManager::class]->extend('tntsearch', function () { |
|
18 | + $this->app[EngineManager::class]->extend('tntsearch', function() { |
|
19 | 19 | $tnt = new TNTSearch(); |
20 | 20 | $tnt->loadConfig(config('scout.tntsearch')); |
21 | 21 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $tnt->loadConfig($config); |
41 | 41 | $tnt->setDatabaseHandle(app('db')->connection()->getPdo()); |
42 | 42 | |
43 | - $indexer = $tnt->createIndex($model->searchableAs() . ".index"); |
|
43 | + $indexer = $tnt->createIndex($model->searchableAs().".index"); |
|
44 | 44 | $indexer->setPrimaryKey($model->getKeyName()); |
45 | 45 | $fields = implode(', ', array_keys($model->toSearchableArray())); |
46 | 46 | |
@@ -53,6 +53,6 @@ discard block |
||
53 | 53 | $indexer->query("SELECT $query FROM {$model->getTable()};"); |
54 | 54 | |
55 | 55 | $indexer->run(); |
56 | - $this->info('All [' . $class . '] records have been imported.'); |
|
56 | + $this->info('All ['.$class.'] records have been imported.'); |
|
57 | 57 | } |
58 | 58 | } |