Code Duplication    Length = 8-8 lines in 2 locations

lib/Php/PhpConverter.php 2 locations

@@ 132-139 (lines=8) @@
129
130
    private function visitAttributeGroup(PHPClass $class, Schema $schema, AttributeGroup $att)
131
    {
132
        foreach ($att->getAttributes() as $childAttr) {
133
            if ($childAttr instanceof AttributeGroup) {
134
                $this->visitAttributeGroup($class, $schema, $childAttr);
135
            } else {
136
                $property = $this->visitAttribute($class, $schema, $childAttr);
137
                $class->addProperty($property);
138
            }
139
        }
140
    }
141
142
    private function visitElementDef(ElementDef $element)
@@ 347-354 (lines=8) @@
344
        }
345
        $schema = $type->getSchema();
346
347
        foreach ($type->getAttributes() as $attr) {
348
            if ($attr instanceof AttributeGroup) {
349
                $this->visitAttributeGroup($class, $schema, $attr);
350
            } else {
351
                $property = $this->visitAttribute($class, $schema, $attr);
352
                $class->addProperty($property);
353
            }
354
        }
355
    }
356
357
    private function visitAttribute(PHPClass $class, Schema $schema, AttributeItem $attribute, $arrayize = true)