Code Duplication    Length = 5-5 lines in 2 locations

lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php 2 locations

@@ 449-453 (lines=5) @@
446
                    $association->setOrderBy($orderBy);
447
                }
448
449
                if (isset($oneToManyElement['index-by'])) {
450
                    $association->setIndexedBy((string) $oneToManyElement['index-by']);
451
                } else if (isset($oneToManyElement->{'index-by'})) {
452
                    throw new \InvalidArgumentException("<index-by /> is not a valid tag");
453
                }
454
455
                // Evaluate second level cache
456
                if (isset($oneToManyElement->cache)) {
@@ 596-600 (lines=5) @@
593
                    $association->setOrderBy($orderBy);
594
                }
595
596
                if (isset($manyToManyElement['index-by'])) {
597
                    $association->setIndexedBy((string) $manyToManyElement['index-by']);
598
                } else if (isset($manyToManyElement->{'index-by'})) {
599
                    throw new \InvalidArgumentException("<index-by /> is not a valid tag");
600
                }
601
602
                // Evaluate second level cache
603
                if (isset($manyToManyElement->cache)) {