]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/SearchIndex.php
Reverted shift change to old migration
[bookstack] / app / Entities / Tools / SearchIndex.php
index 81a5022ce33c4f5ccc87ac6902305bcac0c65fac..cc0b32d6a00f1437ce2845b3f1e107aae663f39f 100644 (file)
@@ -1,4 +1,6 @@
-<?php namespace BookStack\Entities\Tools;
+<?php
+
+namespace BookStack\Entities\Tools;
 
 use BookStack\Entities\EntityProvider;
 use BookStack\Entities\Models\Entity;
@@ -17,14 +19,12 @@ class SearchIndex
      */
     protected $entityProvider;
 
-
     public function __construct(SearchTerm $searchTerm, EntityProvider $entityProvider)
     {
         $this->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,
             ];
         }