Code Duplication    Length = 9-9 lines in 2 locations

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

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