Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace App\Http\Repositories\interfaces;
4
5use Illuminate\Support\Collection;
6
7/**
8 * Interface for search data repository operations.
9 *
10 * Abstracts database queries for searching shortcuts and templates
11 * by title, text, html body, shortcut name, or first line content.
12 */
13interface ISearchDataRepository
14{
15    /**
16     * Search shortcuts matching the given query string.
17     *
18     * Searches across title, text, html, shortcut, and first_line fields
19     * using LIKE matching. Results are scoped to the authenticated user
20     * via the Shortcut model's UserScope.
21     *
22     * @param  string  $query  The search term (will be wrapped in % wildcards)
23     * @param  int  $limit  Maximum number of results to return
24     * @return Collection<int, \App\Http\Models\Shortcut> Collection of matching shortcuts
25     */
26    public function searchShortcuts(string $query, int $limit = 50): Collection;
27
28    /**
29     * Search templates matching the given query string.
30     *
31     * Searches across title, text, html, shortcut, and first_line fields
32     * using LIKE matching.
33     *
34     * @param  string  $query  The search term (will be wrapped in % wildcards)
35     * @param  int  $limit  Maximum number of results to return
36     * @return Collection<int, \App\Http\Models\Template> Collection of matching templates
37     */
38    public function searchTemplates(string $query, int $limit = 50): Collection;
39}