Code Duplication    Length = 9-9 lines in 2 locations

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

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