X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..refs/pull/3008/head:/app/Entities/Tools/SearchOptions.php diff --git a/app/Entities/Tools/SearchOptions.php b/app/Entities/Tools/SearchOptions.php index 60e3a9b78..7913e0969 100644 --- a/app/Entities/Tools/SearchOptions.php +++ b/app/Entities/Tools/SearchOptions.php @@ -1,10 +1,11 @@ - $value) { $instance->$type = $value; } + return $instance; } @@ -67,6 +69,7 @@ class SearchOptions if (isset($inputs['types']) && count($inputs['types']) < 4) { $instance->filters['type'] = implode('|', $inputs['types']); } + return $instance; } @@ -77,15 +80,15 @@ class SearchOptions { $terms = [ 'searches' => [], - 'exacts' => [], - 'tags' => [], - 'filters' => [] + 'exacts' => [], + 'tags' => [], + 'filters' => [], ]; $patterns = [ - 'exacts' => '/"(.*?)"/', - 'tags' => '/\[(.*?)\]/', - 'filters' => '/\{(.*?)\}/' + 'exacts' => '/"(.*?)"/', + 'tags' => '/\[(.*?)\]/', + 'filters' => '/\{(.*?)\}/', ]; // Parse special terms @@ -137,5 +140,4 @@ class SearchOptions return $string; } - -} \ No newline at end of file +}