Completed
Pull Request — master (#259)
by
unknown
01:19
created
src/TNTSearchScoutServiceProvider.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -43,6 +43,9 @@  discard block
 block discarded – undo
43 43
         });
44 44
     }
45 45
 
46
+    /**
47
+     * @param TNTSearch $tnt
48
+     */
46 49
     protected function setFuzziness($tnt)
47 50
     {
48 51
         $tnt->fuzziness            = config('scout.tntsearch.fuzziness', $tnt->fuzziness);
@@ -51,6 +54,9 @@  discard block
 block discarded – undo
51 54
         $tnt->fuzzy_max_expansions = config('scout.tntsearch.fuzzy.max_expansions', $tnt->fuzzy_max_expansions);
52 55
     }
53 56
 
57
+    /**
58
+     * @param TNTSearch $tnt
59
+     */
54 60
     protected function setAsYouType($tnt)
55 61
     {
56 62
         $tnt->asYouType = config('scout.tntsearch.asYouType', $tnt->asYouType);
Please login to merge, or discard this patch.
src/Engines/TNTSearchEngine.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -291,6 +291,7 @@
 block discarded – undo
291 291
      * The constraints usually remove only a small amount of results, which is why the non
292 292
      * matching results are looked up and removed, instead of returning a collection with
293 293
      * all the valid results.
294
+     * @param Builder $builder
294 295
      */
295 296
     private function discardIdsFromResultSetByConstraints($builder, $searchResults)
296 297
     {
Please login to merge, or discard this 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.