Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
53 | 11 | public function compile(): array |
|
54 | { |
||
55 | $query = [ |
||
56 | 11 | 'query' => $this->query, |
|
57 | ]; |
||
58 | |||
59 | 11 | if (\count($this->fields) > null) { |
|
60 | 1 | $query['fields'] = $this->fields; |
|
61 | } |
||
62 | |||
63 | 11 | $query += $this->options([ |
|
64 | 11 | \ELASTICS_FIELD_OPERATOR => 'default_operator', |
|
65 | \ELASTICS_FIELD_PREFIX_LENGTH => 'fuzzy_prefix_length', |
||
66 | \ELASTICS_FIELD_MAX_EXPANSIONS => 'fuzzy_max_expansions', |
||
67 | \ELASTICS_FIELD_TRANSPOSITIONS => 'fuzzy_transpositions', |
||
68 | ]); |
||
69 | |||
70 | 11 | return $query; |
|
71 | } |
||
73 |