Code Duplication    Length = 10-12 lines in 2 locations

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

@@ 542-553 (lines=12) @@
539
     *
540
     * @param string $repositoryClassName The class name of the custom repository.
541
     */
542
    public function setCustomRepositoryClass($repositoryClassName)
543
    {
544
        if ($this->isEmbeddedDocument) {
545
            return;
546
        }
547
548
        if ($repositoryClassName && strpos($repositoryClassName, '\\') === false && strlen($this->namespace)) {
549
            $repositoryClassName = $this->namespace . '\\' . $repositoryClassName;
550
        }
551
552
        $this->customRepositoryClassName = $repositoryClassName;
553
    }
554
555
    /**
556
     * Dispatches the lifecycle event of the given document by invoking all
@@ 1846-1855 (lines=10) @@
1843
     *
1844
     * @param string[] $subclasses The names of all mapped subclasses.
1845
     */
1846
    public function setSubclasses(array $subclasses)
1847
    {
1848
        foreach ($subclasses as $subclass) {
1849
            if (strpos($subclass, '\\') === false && strlen($this->namespace)) {
1850
                $this->subClasses[] = $this->namespace . '\\' . $subclass;
1851
            } else {
1852
                $this->subClasses[] = $subclass;
1853
            }
1854
        }
1855
    }
1856
1857
    /**
1858
     * Sets the parent class names.