Code Duplication    Length = 10-12 lines in 2 locations

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

@@ 535-546 (lines=12) @@
532
     *
533
     * @param string $repositoryClassName The class name of the custom repository.
534
     */
535
    public function setCustomRepositoryClass($repositoryClassName)
536
    {
537
        if ($this->isEmbeddedDocument) {
538
            return;
539
        }
540
541
        if ($repositoryClassName && strpos($repositoryClassName, '\\') === false && strlen($this->namespace)) {
542
            $repositoryClassName = $this->namespace . '\\' . $repositoryClassName;
543
        }
544
545
        $this->customRepositoryClassName = $repositoryClassName;
546
    }
547
548
    /**
549
     * Dispatches the lifecycle event of the given document by invoking all
@@ 1818-1827 (lines=10) @@
1815
     *
1816
     * @param string[] $subclasses The names of all mapped subclasses.
1817
     */
1818
    public function setSubclasses(array $subclasses)
1819
    {
1820
        foreach ($subclasses as $subclass) {
1821
            if (strpos($subclass, '\\') === false && strlen($this->namespace)) {
1822
                $this->subClasses[] = $this->namespace . '\\' . $subclass;
1823
            } else {
1824
                $this->subClasses[] = $subclass;
1825
            }
1826
        }
1827
    }
1828
1829
    /**
1830
     * Sets the parent class names.