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