| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function get() : array |
||
| 15 | { |
||
| 16 | $startTime = $this->initMetricStartTime(); |
||
| 17 | |||
| 18 | $result = ElasticDsl::getEsClient()->suggest([ |
||
| 19 | 'index' => $this->getEsIndex(), |
||
| 20 | 'body' => $this->toDsl() |
||
| 21 | ]); |
||
| 22 | |||
| 23 | if ($startTime) { |
||
| 24 | $this->setHistogramMetric($startTime, 'suggest'); |
||
| 25 | } |
||
| 26 | |||
| 27 | return $result; |
||
| 28 | } |
||
| 96 |