Code Duplication    Length = 3-3 lines in 2 locations

lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadataFactory.php 2 locations

@@ 312-314 (lines=3) @@
309
    private function addInheritedFields(ClassMetadata $subClass, ClassMetadata $parentClass) : void
310
    {
311
        foreach ($parentClass->fieldMappings as $fieldName => $mapping) {
312
            if (! isset($mapping['inherited']) && ! $parentClass->isMappedSuperclass) {
313
                $mapping['inherited'] = $parentClass->name;
314
            }
315
            if (! isset($mapping['declared'])) {
316
                $mapping['declared'] = $parentClass->name;
317
            }
@@ 338-340 (lines=3) @@
335
                $mapping['sourceDocument'] = $subClass->name;
336
            }
337
338
            if (! isset($mapping['inherited']) && ! $parentClass->isMappedSuperclass) {
339
                $mapping['inherited'] = $parentClass->name;
340
            }
341
            if (! isset($mapping['declared'])) {
342
                $mapping['declared'] = $parentClass->name;
343
            }