Code Duplication    Length = 10-12 lines in 2 locations

lib/Doctrine/ORM/EntityManager.php 2 locations

@@ 665-674 (lines=10) @@
662
     *
663
     * @deprecated This method is deprecated and will be removed in Doctrine 3.0.
664
     */
665
    public function detach($entity)
666
    {
667
        @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine 3.0.', E_USER_DEPRECATED);
668
669
        if ( ! is_object($entity)) {
670
            throw ORMInvalidArgumentException::invalidObject('EntityManager#detach()', $entity);
671
        }
672
673
        $this->unitOfWork->detach($entity);
674
    }
675
676
    /**
677
     * Merges the state of a detached entity into the persistence context
@@ 690-701 (lines=12) @@
687
     *
688
     * @deprecated This method is deprecated and will be removed in Doctrine 3.0.
689
     */
690
    public function merge($entity)
691
    {
692
        @trigger_error('Method ' . __METHOD__ . '() is deprecated and will be removed in Doctrine 3.0.', E_USER_DEPRECATED);
693
694
        if ( ! is_object($entity)) {
695
            throw ORMInvalidArgumentException::invalidObject('EntityManager#merge()', $entity);
696
        }
697
698
        $this->errorIfClosed();
699
700
        return $this->unitOfWork->merge($entity);
701
    }
702
703
    /**
704
     * {@inheritDoc}