Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 90-100 (lines=11) @@
87
            throw MappingException::classIsNotAValidDocument($className);
88
        }
89
90
        if (isset($element['id'])) {
91
            foreach ($element['id'] AS $fieldName => $idElement) {
92
                $class->mapField(array(
93
                    'fieldName' => $fieldName,
94
                    'indexed'   => (isset($idElement['index'])) ? (bool)$idElement['index'] : false,
95
                    'type'      => (isset($idElement['type'])) ? $idElement['type'] : null,
96
                    'id'        => true,
97
                    'strategy'  => (isset($idElement['strategy'])) ? $idElement['strategy'] :  null,
98
                ));
99
            }
100
        }
101
102
        if (isset($element['fields'])) {
103
            foreach ($element['fields'] AS $fieldName => $fieldElement) {
@@ 102-112 (lines=11) @@
99
            }
100
        }
101
102
        if (isset($element['fields'])) {
103
            foreach ($element['fields'] AS $fieldName => $fieldElement) {
104
                $class->mapField(array(
105
                    'fieldName' => $fieldName,
106
                    'jsonName'  => (isset($fieldElement['jsonName'])) ? $fieldElement['jsonName'] : null,
107
                    'indexed'   => (isset($fieldElement['index'])) ? (bool)$fieldElement['index'] : false,
108
                    'type'      => (isset($fieldElement['type'])) ? $fieldElement['type'] : null,
109
                    'isVersionField' => (isset($fieldElement['version'])) ? true : null,
110
                ));
111
            }
112
        }
113
114
115
        if (isset($element['referenceOne'])) {