Code Duplication    Length = 10-10 lines in 3 locations

lib/Doctrine/ORM/EntityManager.php 3 locations

@@ 640-649 (lines=10) @@
637
     * @throws ORMInvalidArgumentException
638
     * @throws ORMException
639
     */
640
    public function persist($entity)
641
    {
642
        if ( ! is_object($entity)) {
643
            throw ORMInvalidArgumentException::invalidObject('EntityManager#persist()', $entity);
644
        }
645
646
        $this->errorIfClosed();
647
648
        $this->unitOfWork->persist($entity);
649
    }
650
651
    /**
652
     * Removes an entity instance.
@@ 664-673 (lines=10) @@
661
     * @throws ORMInvalidArgumentException
662
     * @throws ORMException
663
     */
664
    public function remove($entity)
665
    {
666
        if ( ! is_object($entity)) {
667
            throw ORMInvalidArgumentException::invalidObject('EntityManager#remove()', $entity);
668
        }
669
670
        $this->errorIfClosed();
671
672
        $this->unitOfWork->remove($entity);
673
    }
674
675
    /**
676
     * Refreshes the persistent state of an entity from the database,
@@ 686-695 (lines=10) @@
683
     * @throws ORMInvalidArgumentException
684
     * @throws ORMException
685
     */
686
    public function refresh($entity)
687
    {
688
        if ( ! is_object($entity)) {
689
            throw ORMInvalidArgumentException::invalidObject('EntityManager#refresh()', $entity);
690
        }
691
692
        $this->errorIfClosed();
693
694
        $this->unitOfWork->refresh($entity);
695
    }
696
697
    /**
698
     * {@inheritDoc}