Code Duplication    Length = 5-6 lines in 2 locations

src/SchemaReader.php 2 locations

@@ 319-324 (lines=6) @@
316
                    }
317
                    $elementContainer->addElement($element);
318
                    break;
319
                case 'group':
320
                    $referencedGroup = $this->findSomething('findGroup', $elementContainer->getSchema(), $node, $childNode->getAttribute("ref"));
321
322
                    $group = $this->loadGroupRef($referencedGroup, $childNode);
323
                    $elementContainer->addElement($group);
324
                    break;
325
            }
326
        }
327
    }
@@ 395-399 (lines=5) @@
392
393
                        $type->addAttribute($attribute);
394
                        break;
395
                    case 'group':
396
                        $referencedGroup = $this->findSomething('findGroup', $schema, $node, $childNode->getAttribute("ref"));
397
                        $group = $this->loadGroupRef($referencedGroup, $childNode);
398
                        $type->addElement($group);
399
                        break;
400
                    case 'attributeGroup':
401
                        $attribute = $this->findSomething('findAttributeGroup', $schema, $node, $childNode->getAttribute("ref"));
402
                        $type->addAttribute($attribute);