| Total Complexity | 5 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | trait Searchable |
||
| 15 | { |
||
| 16 | use HasPagination, HandlesRequest; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @return string |
||
| 20 | */ |
||
| 21 | protected function getSearchScope() |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Executes search to API. Query - search string. |
||
| 28 | * |
||
| 29 | * @param string $query |
||
| 30 | * @param string $scope |
||
| 31 | * @return SearchResponse |
||
| 32 | */ |
||
| 33 | protected function execSearchRequest($query, $scope) |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Search entities by search query. |
||
| 53 | * |
||
| 54 | * @param string $query |
||
| 55 | * @param int $limit |
||
| 56 | * |
||
| 57 | * @return Pagination |
||
| 58 | */ |
||
| 59 | public function search($query, $limit = Pagination::DEFAULT_LIMIT) |
||
| 66 |