| Conditions | 2 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | public function get(string $index, string $type): ?MappingInterface |
||
| 45 | { |
||
| 46 | try { |
||
| 47 | $data = $this |
||
| 48 | ->client |
||
| 49 | ->indices() |
||
| 50 | ->getMapping(['index' => $index, 'type' => $type]); |
||
| 51 | $mapping = $data[$index]['mappings'][$type]; |
||
| 52 | return Mapping::fromArray($mapping)->setType(RootType::ID); |
||
| 53 | } catch (Missing404Exception $e) { |
||
| 54 | return null; |
||
| 55 | } |
||
| 58 |