-<?php namespace BookStack\Entities\Tools;
+<?php
+
+namespace BookStack\Entities\Tools;
use BookStack\Entities\EntityProvider;
use BookStack\Entities\Models\Entity;
*/
protected $entityProvider;
-
public function __construct(SearchTerm $searchTerm, EntityProvider $entityProvider)
{
$this->searchTerm = $searchTerm;
$this->entityProvider = $entityProvider;
}
-
/**
* Index the given entity.
*/
}
/**
- * Index multiple Entities at once
+ * Index multiple Entities at once.
+ *
* @param Entity[] $entities
*/
protected function indexEntities(array $entities)
$terms = [];
foreach ($tokenMap as $token => $count) {
$terms[] = [
- 'term' => $token,
- 'score' => $count * $scoreAdjustment
+ 'term' => $token,
+ 'score' => $count * $scoreAdjustment,
];
}