Completed
Pull Request — master (#259)
by
unknown
01:19
created
src/Engines/TNTSearchEngine.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,9 @@  discard block
 block discarded – undo
62 62
         $geoindex->indexBeginTransaction();
63 63
         $models->each(function ($model) use ($index, $geoindex) {
64 64
             $array = $model->toSearchableArray();
65
-            if (empty($array)) return;
65
+            if (empty($array)) {
66
+                return;
67
+            }
66 68
 
67 69
             if ($model->getKey()) {
68 70
                 $index->update($model->getKey(), $array);
@@ -73,7 +75,9 @@  discard block
 block discarded – undo
73 75
                 $index->insert($array);
74 76
             }
75 77
 
76
-            if (empty($array['longitude']) || empty($array['latitude'])) return;
78
+            if (empty($array['longitude']) || empty($array['latitude'])) {
79
+                return;
80
+            }
77 81
             $array['longitude'] = (float) $array['longitude'];
78 82
             $array['latitude'] = (float) $array['latitude'];
79 83
 
Please login to merge, or discard this patch.