Code Duplication    Length = 10-12 lines in 2 locations

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

@@ 538-549 (lines=12) @@
535
     *
536
     * @param string $repositoryClassName The class name of the custom repository.
537
     */
538
    public function setCustomRepositoryClass($repositoryClassName)
539
    {
540
        if ($this->isEmbeddedDocument) {
541
            return;
542
        }
543
544
        if ($repositoryClassName && strpos($repositoryClassName, '\\') === false && strlen($this->namespace)) {
545
            $repositoryClassName = $this->namespace . '\\' . $repositoryClassName;
546
        }
547
548
        $this->customRepositoryClassName = $repositoryClassName;
549
    }
550
551
    /**
552
     * Dispatches the lifecycle event of the given document by invoking all
@@ 1750-1759 (lines=10) @@
1747
     *
1748
     * @param string[] $subclasses The names of all mapped subclasses.
1749
     */
1750
    public function setSubclasses(array $subclasses)
1751
    {
1752
        foreach ($subclasses as $subclass) {
1753
            if (strpos($subclass, '\\') === false && strlen($this->namespace)) {
1754
                $this->subClasses[] = $this->namespace . '\\' . $subclass;
1755
            } else {
1756
                $this->subClasses[] = $subclass;
1757
            }
1758
        }
1759
    }
1760
1761
    /**
1762
     * Sets the parent class names.