Code Duplication    Length = 10-12 lines in 2 locations

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

@@ 532-543 (lines=12) @@
529
     *
530
     * @param string $repositoryClassName The class name of the custom repository.
531
     */
532
    public function setCustomRepositoryClass($repositoryClassName)
533
    {
534
        if ($this->isEmbeddedDocument) {
535
            return;
536
        }
537
538
        if ($repositoryClassName && strpos($repositoryClassName, '\\') === false && strlen($this->namespace)) {
539
            $repositoryClassName = $this->namespace . '\\' . $repositoryClassName;
540
        }
541
542
        $this->customRepositoryClassName = $repositoryClassName;
543
    }
544
545
    /**
546
     * Dispatches the lifecycle event of the given document by invoking all
@@ 1724-1733 (lines=10) @@
1721
     *
1722
     * @param string[] $subclasses The names of all mapped subclasses.
1723
     */
1724
    public function setSubclasses(array $subclasses)
1725
    {
1726
        foreach ($subclasses as $subclass) {
1727
            if (strpos($subclass, '\\') === false && strlen($this->namespace)) {
1728
                $this->subClasses[] = $this->namespace . '\\' . $subclass;
1729
            } else {
1730
                $this->subClasses[] = $subclass;
1731
            }
1732
        }
1733
    }
1734
1735
    /**
1736
     * Sets the parent class names.