Code Duplication    Length = 5-6 lines in 2 locations

src/SchemaReader.php 2 locations

@@ 299-304 (lines=6) @@
296
                    }
297
                    $elementContainer->addElement($element);
298
                    break;
299
                case 'group':
300
                    $referencedGroup = $this->findSomething('findGroup', $elementContainer->getSchema(), $node, $childNode->getAttribute("ref"));
301
302
                    $group = $this->loadGroupRef($referencedGroup, $childNode);
303
                    $elementContainer->addElement($group);
304
                    break;
305
            }
306
        }
307
    }
@@ 375-379 (lines=5) @@
372
373
                        $type->addAttribute($attribute);
374
                        break;
375
                    case 'group':
376
                        $referencedGroup = $this->findSomething('findGroup', $schema, $node, $childNode->getAttribute("ref"));
377
                        $group = $this->loadGroupRef($referencedGroup, $childNode);
378
                        $type->addElement($group);
379
                        break;
380
                    case 'attributeGroup':
381
                        $attribute = $this->findSomething('findAttributeGroup', $schema, $node, $childNode->getAttribute("ref"));
382
                        $type->addAttribute($attribute);