Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
48 | 3 | protected function createTypes(Index $index, array $types): void |
|
49 | { |
||
50 | 3 | foreach ($types as $type) { |
|
51 | 2 | $esType = $index->getType($type->getName()); |
|
52 | |||
53 | 2 | $mapping = new Mapping(); |
|
54 | 2 | $mapping->setType($esType); |
|
55 | |||
56 | 2 | $mapping->setProperties($type->getMapping()); |
|
57 | |||
58 | 2 | $mapping->send(); |
|
59 | } |
||
61 | } |