Total Complexity | 4 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 4 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
21 | class SearchQuery extends BaseQuery |
||
22 | { |
||
23 | /** |
||
24 | * @var int Default page size |
||
25 | */ |
||
26 | public static $default_page_size = 10; |
||
27 | |||
28 | /** |
||
29 | * A simple stub to cover changes between Solr Search modules |
||
30 | * |
||
31 | * @param string $text |
||
32 | * @param null|array $fields |
||
33 | * @param int $boost |
||
34 | * @return $this |
||
35 | * @deprecated please use {@link self::addTerm()} |
||
36 | */ |
||
37 | 1 | public function addSearchTerm($text, $fields = [], int $boost = 0) |
|
38 | { |
||
39 | 1 | $fields = $fields ? (array)$fields : []; |
|
40 | 1 | $this->addTerm($text, $fields, $boost); |
|
41 | |||
42 | 1 | return $this; |
|
43 | } |
||
44 | |||
45 | /** |
||
46 | * Set the rows that are to be returned |
||
47 | * Compatibility stub |
||
48 | * |
||
49 | * @param int $limit |
||
50 | * @return $this |
||
51 | * @deprecated please use {@link self::setRows()} |
||
52 | */ |
||
53 | 1 | public function setLimit($limit): self |
|
54 | { |
||
55 | 1 | $this->rows = $limit; |
|
56 | |||
57 | 1 | return $this; |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * Get the rows that are to be returned |
||
62 | * Compatibility stub |
||
63 | * |
||
64 | * @return int |
||
65 | * @deprecated please use {@link self::getRows()} |
||
66 | */ |
||
67 | 1 | public function getLimit(): int |
|
70 | } |
||
71 | } |
||
72 |