Code Duplication    Length = 9-9 lines in 2 locations

lib/Doctrine/ODM/MongoDB/UnitOfWork.php 2 locations

@@ 2614-2622 (lines=9) @@
2611
     * 
2612
     * @param \Doctrine\ODM\MongoDB\PersistentCollection $coll
2613
     */
2614
    public function unscheduleCollectionDeletion(PersistentCollection $coll)
2615
    {
2616
        $oid = spl_object_hash($coll);
2617
        if (isset($this->collectionDeletions[$oid])) {
2618
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2619
            unset($this->collectionDeletions[$oid]);
2620
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2621
        }
2622
    }
2623
2624
    /**
2625
     * INTERNAL:
@@ 2652-2660 (lines=9) @@
2649
     * 
2650
     * @param \Doctrine\ODM\MongoDB\PersistentCollection $coll
2651
     */
2652
    public function unscheduleCollectionUpdate(PersistentCollection $coll)
2653
    {
2654
        $oid = spl_object_hash($coll);
2655
        if (isset($this->collectionUpdates[$oid])) {
2656
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2657
            unset($this->collectionUpdates[$oid]);
2658
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2659
        }
2660
    }
2661
    
2662
    /**
2663
     * Checks whether a PersistentCollection is scheduled for update.