| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 16 | public function setBody($params = null) |
||
| 17 | { |
||
| 18 | if (isset($this->_index)) { |
||
| 19 | if (isset($params['path'])) { |
||
| 20 | return parent::setBody([ |
||
| 21 | 'query' => 'IMPORT TABLE ' . |
||
| 22 | $this->_index . |
||
| 23 | ' FROM ' . |
||
| 24 | $params['path'] |
||
| 25 | ]); |
||
| 26 | |||
| 27 | } |
||
| 28 | throw new RuntimeException('Missing import index path in /indices/import'); |
||
| 29 | } |
||
| 30 | throw new RuntimeException('Missing index name in /indices/import'); |
||
| 31 | } |
||
| 48 | } |