Code Duplication    Length = 10-12 lines in 2 locations

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

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