Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 73-83 (lines=11) @@
70
            throw MappingException::classIsNotAValidDocument($className);
71
        }
72
73
        if (isset($element['id'])) {
74
            foreach ($element['id'] AS $fieldName => $idElement) {
75
                $class->mapField(array(
76
                    'fieldName' => $fieldName,
77
                    'indexed'   => (isset($idElement['index'])) ? (bool)$idElement['index'] : false,
78
                    'type'      => (isset($idElement['type'])) ? $idElement['type'] : null,
79
                    'id'        => true,
80
                    'strategy'  => (isset($idElement['strategy'])) ? $idElement['strategy'] :  null,
81
                ));
82
            }
83
        }
84
85
        if (isset($element['fields'])) {
86
            foreach ($element['fields'] AS $fieldName => $fieldElement) {
@@ 85-95 (lines=11) @@
82
            }
83
        }
84
85
        if (isset($element['fields'])) {
86
            foreach ($element['fields'] AS $fieldName => $fieldElement) {
87
                $class->mapField(array(
88
                    'fieldName' => $fieldName,
89
                    'jsonName'  => (isset($fieldElement['jsonName'])) ? $fieldElement['jsonName'] : null,
90
                    'indexed'   => (isset($fieldElement['index'])) ? (bool)$fieldElement['index'] : false,
91
                    'type'      => (isset($fieldElement['type'])) ? $fieldElement['type'] : null,
92
                    'isVersionField' => (isset($fieldElement['version'])) ? true : null,
93
                ));
94
            }
95
        }
96
97
98
        if (isset($element['referenceOne'])) {