Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
49 | 4 | public function compile(): array |
|
50 | { |
||
51 | $query = [ |
||
52 | 4 | 'queries' => \elastics_compile(...$this->queries), |
|
53 | ]; |
||
54 | |||
55 | 4 | if ($this->boost !== null) { |
|
56 | 1 | $query['boost'] = $this->boost; |
|
57 | } |
||
58 | |||
59 | 4 | if ($this->tieBreaker !== null) { |
|
60 | 1 | $query['tie_breaker'] = $this->tieBreaker; |
|
61 | } |
||
62 | |||
63 | 4 | return $query; |
|
64 | } |
||
66 |