Completed
Push — master ( d20172...a58861 )
by Nenad
9s
created
src/Engines/TNTSearchEngine.php 1 patch
Spacing   +7 added lines, -7 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,12 +190,12 @@  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
-                }, true);;
198
+                }, true); ;
199 199
         });
200 200
     }
201 201
 
Please login to merge, or discard this patch.