Completed
Push — master ( 1e2906...34fc1b )
by Nenad
10s
created
src/Engines/TNTSearchEngine.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $index->setPrimaryKey($models->first()->getKeyName());
45 45
 
46 46
         $index->indexBeginTransaction();
47
-        $models->each(function ($model) use ($index) {
47
+        $models->each(function($model) use ($index) {
48 48
             if ($model->getKey()) {
49 49
                 $index->update($model->getKey(), $model->toSearchableArray());
50 50
             } else {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public function delete($models)
65 65
     {
66 66
         $this->initIndex($models->first());
67
-        $models->each(function ($model) {
67
+        $models->each(function($model) {
68 68
             $this->tnt->selectIndex("{$model->searchableAs()}.index");
69 69
             $index = $this->tnt->getIndex();
70 70
             $index->setPrimaryKey($model->getKeyName());
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      */
142 142
     protected function filters(Builder $builder)
143 143
     {
144
-        return collect($builder->wheres)->map(function ($value, $key) {
144
+        return collect($builder->wheres)->map(function($value, $key) {
145 145
             return $key.'='.$value;
146 146
         })->values()->all();
147 147
     }
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
             $model->getQualifiedKeyName(), $keys
167 167
         )->get()->keyBy($model->getKeyName());
168 168
 
169
-        return collect($results['ids'])->map(function ($hit) use ($models) {
169
+        return collect($results['ids'])->map(function($hit) use ($models) {
170 170
             return $models->has($hit) ? $models[$hit] : null;
171
-        })->filter(function ($model) use ($fieldsWheres) {
172
-            return !is_null($model) && array_reduce($fieldsWheres, function ($carry, $item) use($model) {
171
+        })->filter(function($model) use ($fieldsWheres) {
172
+            return !is_null($model) && array_reduce($fieldsWheres, function($carry, $item) use($model) {
173 173
                     return $carry && $model[$item] == $this->builder->wheres[$item];
174
-                }, true);;
174
+                }, true); ;
175 175
         });
176 176
     }
177 177
 
Please login to merge, or discard this patch.