Code Duplication    Length = 9-9 lines in 2 locations

lib/Doctrine/ODM/CouchDB/Mapping/Driver/XmlDriver.php 2 locations

@@ 76-84 (lines=9) @@
73
74
        // Evaluate <field ...> mappings
75
        if (isset($xmlRoot->field)) {
76
            foreach ($xmlRoot->field as $fieldMapping) {
77
                $class->mapField(array(
78
                    'fieldName' => (string)$fieldMapping['name'],
79
                    'jsonName'  => (isset($fieldMapping['json-name'])) ? (string)$fieldMapping['json-name'] : null,
80
                    'indexed'   => (isset($fieldMapping['index'])) ? (bool)$fieldMapping['index'] : false,
81
                    'type'      => (isset($fieldMapping['type'])) ? (string)$fieldMapping['type'] : null,
82
                    'isVersionField'   => (isset($fieldMapping['version'])) ? true : null,
83
                ));
84
            }
85
        }
86
87
        // Evaluate <id ..> mappings
@@ 88-96 (lines=9) @@
85
        }
86
87
        // Evaluate <id ..> mappings
88
        foreach ($xmlRoot->id as $idElement) {
89
            $class->mapField(array(
90
                'fieldName' => (string)$idElement['name'],
91
                'indexed'   => (isset($idElement['index'])) ? (bool)$idElement['index'] : false,
92
                'type'      => (isset($idElement['type'])) ? (string)$idElement['type'] : null,
93
                'id'        => true,
94
                'strategy'  => (isset($idElement['strategy'])) ? (string)$idElement['strategy'] : null,
95
            ));
96
        }
97
98
        // Evaluate <version ..> mappings
99
        foreach ($xmlRoot->version as $versionElement) {