Conditions | 3 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
66 | public function toArray() |
||
67 | { |
||
68 | $body = [ |
||
69 | 'queries' => array_map(function (QueryDSL $query) { |
||
70 | return $query->toArray(); |
||
71 | }, $this->queries), |
||
72 | ]; |
||
73 | |||
74 | if ($this->tieBreaker !== null) { |
||
75 | $body['tie_breaker'] = $this->tieBreaker; |
||
76 | } |
||
77 | |||
78 | if ($this->hasBoost()) { |
||
79 | $body['boost'] = $this->getBoost(); |
||
80 | } |
||
81 | |||
82 | return $body; |
||
83 | } |
||
85 |