Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 437-441 (lines=5) @@
434
                    $mapping['orderBy'] = $orderBy;
435
                }
436
437
                if (isset($oneToManyElement['index-by'])) {
438
                    $mapping['indexBy'] = (string) $oneToManyElement['index-by'];
439
                } else if (isset($oneToManyElement->{'index-by'})) {
440
                    throw new \InvalidArgumentException("<index-by /> is not a valid tag");
441
                }
442
443
                // Evaluate second level cache
444
                if (isset($oneToManyElement->cache)) {
@@ 553-557 (lines=5) @@
550
                    $mapping['orderBy'] = $orderBy;
551
                }
552
553
                if (isset($manyToManyElement['index-by'])) {
554
                    $mapping['indexBy'] = (string) $manyToManyElement['index-by'];
555
                } else if (isset($manyToManyElement->{'index-by'})) {
556
                    throw new \InvalidArgumentException("<index-by /> is not a valid tag");
557
                }
558
559
                // Evaluate second level cache
560
                if (isset($manyToManyElement->cache)) {