Completed
Push — master ( 6e2d8c...9df611 )
by Nenad
05:18 queued 03:38
created
src/TNTSearchScoutServiceProvider.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -37,6 +37,9 @@  discard block
 block discarded – undo
37 37
         }
38 38
     }
39 39
 
40
+    /**
41
+     * @param TNTSearch $tnt
42
+     */
40 43
     protected function setFuzziness($tnt)
41 44
     {
42 45
         $tnt->fuzziness            = config('scout.tntsearch.fuzziness', $tnt->fuzziness);
@@ -45,6 +48,9 @@  discard block
 block discarded – undo
45 48
         $tnt->fuzzy_max_expansions = config('scout.tntsearch.fuzzy.max_expansions', $tnt->fuzzy_max_expansions);
46 49
     }
47 50
 
51
+    /**
52
+     * @param TNTSearch $tnt
53
+     */
48 54
     protected function setAsYouType($tnt)
49 55
     {
50 56
         $tnt->asYouType = config('scout.tntsearch.asYouType', $tnt->asYouType);
Please login to merge, or discard this patch.
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 boot()
17 17
     {
18
-        $this->app[EngineManager::class]->extend('tntsearch', function ($app) {
18
+        $this->app[EngineManager::class]->extend('tntsearch', function($app) {
19 19
             $tnt = new TNTSearch();
20 20
             
21 21
             $driver = config('database.default');
Please login to merge, or discard this patch.
src/Engines/TNTSearchEngine.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $index->setPrimaryKey($models->first()->getKeyName());
46 46
 
47 47
         $index->indexBeginTransaction();
48
-        $models->each(function ($model) use ($index) {
48
+        $models->each(function($model) use ($index) {
49 49
             $array = $model->toSearchableArray();
50 50
 
51 51
             if (empty($array)) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function delete($models)
72 72
     {
73 73
         $this->initIndex($models->first());
74
-        $models->each(function ($model) {
74
+        $models->each(function($model) {
75 75
             $this->tnt->selectIndex("{$model->searchableAs()}.index");
76 76
             $index = $this->tnt->getIndex();
77 77
             $index->setPrimaryKey($model->getKeyName());
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      */
166 166
     protected function filters(Builder $builder)
167 167
     {
168
-        return collect($builder->wheres)->map(function ($value, $key) {
168
+        return collect($builder->wheres)->map(function($value, $key) {
169 169
             return $key.'='.$value;
170 170
         })->values()->all();
171 171
     }
@@ -190,10 +190,10 @@  discard block
 block discarded – undo
190 190
             $model->getQualifiedKeyName(), $keys
191 191
         )->get()->keyBy($model->getKeyName());
192 192
 
193
-        return collect($results['ids'])->map(function ($hit) use ($models) {
193
+        return collect($results['ids'])->map(function($hit) use ($models) {
194 194
             return $models->has($hit) ? $models[$hit] : null;
195
-        })->filter(function ($model) use ($fieldsWheres) {
196
-            return !is_null($model) && array_reduce($fieldsWheres, function ($carry, $item) use($model) {
195
+        })->filter(function($model) use ($fieldsWheres) {
196
+            return !is_null($model) && array_reduce($fieldsWheres, function($carry, $item) use($model) {
197 197
                     return $carry && $model[$item] == $this->builder->wheres[$item];
198 198
                 }, true);
199 199
         });
Please login to merge, or discard this patch.