@@ -43,6 +43,9 @@ discard block |
||
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 |
||
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); |
@@ -291,6 +291,7 @@ |
||
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 | { |
@@ -62,7 +62,9 @@ discard block |
||
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 |
||
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 |