| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 65 | public function toArray() |
||
| 66 | { |
||
| 67 | if (!isset($this->params['field'])) { |
||
| 68 | $this->params['field'] = '_all'; |
||
| 69 | } |
||
| 70 | |||
| 71 | if (!isset($this->params['size'])) { |
||
| 72 | $this->params['size'] = self::DEFAULT_SIZE; |
||
| 73 | } |
||
| 74 | |||
| 75 | $output = [ |
||
| 76 | 'text' => $this->text, |
||
| 77 | 'term' => $this->params, |
||
| 78 | ]; |
||
| 79 | |||
| 80 | return $output; |
||
| 81 | } |
||
| 82 | } |
||
| 83 |