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