Code Duplication    Length = 3-3 lines in 4 locations

lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadataInfo.php 4 locations

@@ 564-566 (lines=3) @@
561
            return;
562
        }
563
564
        if ($repositoryClassName && strpos($repositoryClassName, '\\') === false && strlen($this->namespace)) {
565
            $repositoryClassName = $this->namespace . '\\' . $repositoryClassName;
566
        }
567
568
        $this->customRepositoryClassName = $repositoryClassName;
569
    }
@@ 1237-1239 (lines=3) @@
1234
        if ($this->discriminatorField !== null && $this->discriminatorField == $mapping['name']) {
1235
            throw MappingException::discriminatorFieldConflict($this->name, $this->discriminatorField);
1236
        }
1237
        if (isset($mapping['targetDocument']) && strpos($mapping['targetDocument'], '\\') === false && strlen($this->namespace)) {
1238
            $mapping['targetDocument'] = $this->namespace . '\\' . $mapping['targetDocument'];
1239
        }
1240
        if (isset($mapping['collectionClass'])) {
1241
            if (strpos($mapping['collectionClass'], '\\') === false && strlen($this->namespace)) {
1242
                $mapping['collectionClass'] = $this->namespace . '\\' . $mapping['collectionClass'];
@@ 1241-1243 (lines=3) @@
1238
            $mapping['targetDocument'] = $this->namespace . '\\' . $mapping['targetDocument'];
1239
        }
1240
        if (isset($mapping['collectionClass'])) {
1241
            if (strpos($mapping['collectionClass'], '\\') === false && strlen($this->namespace)) {
1242
                $mapping['collectionClass'] = $this->namespace . '\\' . $mapping['collectionClass'];
1243
            }
1244
            $mapping['collectionClass'] = ltrim($mapping['collectionClass'], '\\');
1245
        }
1246
        if ( ! empty($mapping['collectionClass'])) {
@@ 1255-1257 (lines=3) @@
1252
1253
        if (isset($mapping['discriminatorMap'])) {
1254
            foreach ($mapping['discriminatorMap'] as $key => $class) {
1255
                if (strpos($class, '\\') === false && strlen($this->namespace)) {
1256
                    $mapping['discriminatorMap'][$key] = $this->namespace . '\\' . $class;
1257
                }
1258
            }
1259
        }
1260