Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
70 | public function compile(): array |
||
71 | { |
||
72 | $query = [ |
||
73 | 'parent_type' => $this->type, |
||
74 | 'query' => $this->query, |
||
75 | ]; |
||
76 | |||
77 | if ($this->score !== null) { |
||
78 | $query['score'] = $this->score; |
||
79 | } |
||
80 | |||
81 | if ($this->ignoreUnmapped !== null) { |
||
82 | $query['ignore_unmapped'] = $this->ignoreUnmapped; |
||
83 | } |
||
84 | |||
85 | return $query; |
||
86 | } |
||
88 |