| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class Operations |
||
| 11 | { |
||
| 12 | public static function from(DescriptorInterface $source): Descriptor |
||
| 13 | { |
||
| 14 | $target = new Descriptor( |
||
| 15 | $source->getName(), |
||
| 16 | $source->getMapping(), |
||
| 17 | $source->getIndexing() |
||
| 18 | ); |
||
| 19 | if ($source->getParentNames() !== null) { |
||
| 20 | $target->setParentNames($source->getParentNames()); |
||
| 21 | } |
||
| 22 | $target->setRootLevelDocument($source->isRootLevelDocument()); |
||
| 23 | return $target; |
||
| 24 | } |
||
| 25 | |||
| 26 | public static function extend(DescriptorInterface $parent, DescriptorInterface $child): Descriptor |
||
| 34 | } |
||
| 35 | } |
||
| 36 |