Completed
Push — master ( 581834...940c6f )
by Nenad
05:32
created
src/Engines/TNTSearchEngine.php 1 patch
Spacing   +5 added lines, -5 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 = $model->toSearchableArray();
36 36
 
37 37
             $this->tnt->selectIndex("{$model->searchableAs()}.index");
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function delete($models)
56 56
     {
57 57
         $this->initIndex($models->first());
58
-        $models->each(function ($model) {
58
+        $models->each(function($model) {
59 59
             $this->tnt->selectIndex("{$model->searchableAs()}.index");
60 60
             $index = $this->tnt->getIndex();
61 61
             $index->setPrimaryKey($model->getKeyName());
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $builder->limit = 500;
90 90
         $results        = $this->performSearch($builder);
91 91
         $chunks         = array_chunk($results['ids'], $perPage);
92
-        if(array_key_exists($page - 1, $chunks)) {
92
+        if (array_key_exists($page - 1, $chunks)) {
93 93
             $results['ids'] = $chunks[$page - 1];
94 94
         } else {
95 95
             $results['ids'] = end($chunks);
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     protected function filters(Builder $builder)
126 126
     {
127
-        return collect($builder->wheres)->map(function ($value, $key) {
127
+        return collect($builder->wheres)->map(function($value, $key) {
128 128
             return $key.'='.$value;
129 129
         })->values()->all();
130 130
     }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             $model->getKeyName(), $keys
148 148
         )->get()->keyBy($model->getKeyName());
149 149
 
150
-        return collect($results['ids'])->map(function ($hit) use ($models) {
150
+        return collect($results['ids'])->map(function($hit) use ($models) {
151 151
             return $models[$hit];
152 152
         });
153 153
     }
Please login to merge, or discard this patch.