Code Duplication    Length = 16-16 lines in 2 locations

src/SchemaReader.php 2 locations

@@ 595-610 (lines=16) @@
592
                case 'restriction':
593
                    $this->loadRestriction($type, $childNode);
594
                    break;
595
                case 'extension':
596
                    if (! ($type instanceof BaseComplexType)) {
597
                        throw new RuntimeException(
598
                            'Argument 1 passed to ' .
599
                            __METHOD__ .
600
                            ' needs to be an instance of ' .
601
                            BaseComplexType::class .
602
                            ' when passed onto ' .
603
                            static::class .
604
                            '::loadExtension(), ' .
605
                            get_class($type) .
606
                            ' given.'
607
                        );
608
                    }
609
                    $this->loadExtension($type, $childNode);
610
                    break;
611
                case 'simpleContent':
612
                case 'complexContent':
613
                    $this->fillTypeNode($type, $childNode, false);
@@ 636-651 (lines=16) @@
633
            switch ($childNode->localName) {
634
                case 'sequence':
635
                case 'choice':
636
                case 'all':
637
                    if (! ($type instanceof ElementContainer)) {
638
                        throw new RuntimeException(
639
                            'Argument 1 passed to ' .
640
                            __METHOD__ .
641
                            ' needs to be an instance of ' .
642
                            ElementContainer::class .
643
                            ' when passed onto ' .
644
                            static::class .
645
                            '::loadSequence(), ' .
646
                            get_class($type) .
647
                            ' given.'
648
                        );
649
                    }
650
                    $this->loadSequence($type, $childNode);
651
                    break;
652
                case 'attribute':
653
                    if ($childNode->hasAttribute("ref")) {
654
                        /**