Code Duplication    Length = 5-6 lines in 2 locations

src/SchemaReader.php 2 locations

@@ 327-332 (lines=6) @@
324
                    }
325
                    $elementContainer->addElement($element);
326
                    break;
327
                case 'group':
328
                    $referencedGroup = $this->findSomething('findGroup', $elementContainer->getSchema(), $node, $childNode->getAttribute("ref"));
329
330
                    $group = $this->loadGroupRef($referencedGroup, $childNode);
331
                    $elementContainer->addElement($group);
332
                    break;
333
            }
334
        }
335
    }
@@ 403-407 (lines=5) @@
400
401
                        $type->addAttribute($attribute);
402
                        break;
403
                    case 'group':
404
                        $referencedGroup = $this->findSomething('findGroup', $schema, $node, $childNode->getAttribute("ref"));
405
                        $group = $this->loadGroupRef($referencedGroup, $childNode);
406
                        $type->addElement($group);
407
                        break;
408
                    case 'attributeGroup':
409
                        $attribute = $this->findSomething('findAttributeGroup', $schema, $node, $childNode->getAttribute("ref"));
410
                        $type->addAttribute($attribute);