X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/4b36df08a80f467c037de3bbdf85e13cd4cef9bc..refs/pull/3012/head:/app/Entities/Tools/SearchIndex.php diff --git a/app/Entities/Tools/SearchIndex.php b/app/Entities/Tools/SearchIndex.php index 81a5022ce..cc0b32d6a 100644 --- a/app/Entities/Tools/SearchIndex.php +++ b/app/Entities/Tools/SearchIndex.php @@ -1,4 +1,6 @@ -searchTerm = $searchTerm; $this->entityProvider = $entityProvider; } - /** * Index the given entity. */ @@ -42,7 +42,8 @@ class SearchIndex } /** - * Index multiple Entities at once + * Index multiple Entities at once. + * * @param Entity[] $entities */ protected function indexEntities(array $entities) @@ -110,8 +111,8 @@ class SearchIndex $terms = []; foreach ($tokenMap as $token => $count) { $terms[] = [ - 'term' => $token, - 'score' => $count * $scoreAdjustment + 'term' => $token, + 'score' => $count * $scoreAdjustment, ]; }