Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 2601-2609 (lines=9) @@
2598
     * 
2599
     * @param \Doctrine\ODM\MongoDB\PersistentCollection $coll
2600
     */
2601
    public function unscheduleCollectionDeletion(PersistentCollection $coll)
2602
    {
2603
        $oid = spl_object_hash($coll);
2604
        if (isset($this->collectionDeletions[$oid])) {
2605
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2606
            unset($this->collectionDeletions[$oid]);
2607
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2608
        }
2609
    }
2610
2611
    /**
2612
     * INTERNAL:
@@ 2639-2647 (lines=9) @@
2636
     * 
2637
     * @param \Doctrine\ODM\MongoDB\PersistentCollection $coll
2638
     */
2639
    public function unscheduleCollectionUpdate(PersistentCollection $coll)
2640
    {
2641
        $oid = spl_object_hash($coll);
2642
        if (isset($this->collectionUpdates[$oid])) {
2643
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2644
            unset($this->collectionUpdates[$oid]);
2645
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2646
        }
2647
    }
2648
    
2649
    /**
2650
     * Checks whether a PersistentCollection is scheduled for update.