Completed
Push — master ( 97d18a...887010 )
by Nenad
02:02
created
src/TNTSearchScoutServiceProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -36,6 +36,9 @@
 block discarded – undo
36 36
         }
37 37
     }
38 38
 
39
+    /**
40
+     * @param TNTSearch $tnt
41
+     */
39 42
     private function setFuzziness($tnt)
40 43
     {
41 44
         $prefix_length = config('scout.tntsearch.fuzzy.prefix_length');
Please login to merge, or discard this patch.
src/Engines/TNTSearchEngine.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.