Code Duplication    Length = 8-8 lines in 2 locations

src/SchemaReader.php 2 locations

@@ 92-99 (lines=8) @@
89
        return function () use ($schema, $node, $attGroup) {
90
            foreach ($node->childNodes as $childNode) {
91
                switch ($childNode->localName) {
92
                    case 'attribute':
93
                        if ($childNode->hasAttribute("ref")) {
94
                            /**
95
                            * @var AttributeItem $attribute
96
                            */
97
                            $attribute = $this->findSomething('findAttribute', $schema, $node, $childNode->getAttribute("ref"));
98
                        } else {
99
                            /**
100
                            * @var Attribute $attribute
101
                            */
102
                            $attribute = $this->loadAttribute($schema, $childNode);
@@ 652-659 (lines=8) @@
649
                        $childNode
650
                    );
651
                    break;
652
                case 'attribute':
653
                    if ($childNode->hasAttribute("ref")) {
654
                        /**
655
                        * @var AttributeItem $attribute
656
                        */
657
                        $attribute = $this->findSomething('findAttribute', $type->getSchema(), $node, $childNode->getAttribute("ref"));
658
                    } else {
659
                        /**
660
                        * @var Attribute $attribute
661
                        */
662
                        $attribute = $this->loadAttribute($type->getSchema(), $childNode);