| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function apply(string $index, string $type, MappingInterface $mapping): void |
||
| 30 | { |
||
| 31 | $serialized = Mapping::asObject($mapping); |
||
| 32 | unset($serialized->type); |
||
| 33 | $parameters = [ |
||
| 34 | 'index' => $index, |
||
| 35 | 'type' => $type, |
||
| 36 | 'body' => [$type => $serialized] |
||
| 37 | ]; |
||
| 38 | $this |
||
| 39 | ->client |
||
| 40 | ->indices() |
||
| 41 | ->putMapping($parameters); |
||
| 42 | } |
||
| 58 |