| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 61 | 2 | public function insert( |
|
| 62 | Index $index, |
||
| 63 | $id, |
||
| 64 | array $fields, |
||
| 65 | $uid = false, |
||
| 66 | $deleteFirst = true, |
||
| 67 | $boostFields = [] |
||
| 68 | ) { |
||
| 69 | 2 | $deleteFirst ? $this->delete($index, $id, $uid) : null; |
|
| 70 | 2 | $index->close(); |
|
| 71 | 2 | return $this->insert->insert($index, $id, $fields, $uid, $boostFields); |
|
| 72 | } |
||
| 73 | } |
||
| 74 |