1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Applied StyleCI changes, added php/larastan to attribution

This commit is contained in:
Dan Brown
2021-11-05 16:27:59 +00:00
parent bc291bee78
commit 5c6a6b50a0
8 changed files with 15 additions and 9 deletions

View File

@ -32,7 +32,7 @@ class SearchOptions
public static function fromString(string $search): self
{
$decoded = static::decode($search);
$instance = new SearchOptions;
$instance = new SearchOptions();
foreach ($decoded as $type => $value) {
$instance->$type = $value;
}
@ -55,7 +55,7 @@ class SearchOptions
return static::fromString($request->get('term'));
}
$instance = new SearchOptions;
$instance = new SearchOptions();
$inputs = $request->only(['search', 'types', 'filters', 'exact', 'tags']);
$instance->searches = explode(' ', $inputs['search'] ?? []);
$instance->exacts = array_filter($inputs['exact'] ?? []);