Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 2420-2428 (lines=9) @@
2417
     *
2418
     * @param \Doctrine\ODM\MongoDB\PersistentCollection $coll
2419
     */
2420
    public function unscheduleCollectionDeletion(PersistentCollection $coll)
2421
    {
2422
        $oid = spl_object_hash($coll);
2423
        if (isset($this->collectionDeletions[$oid])) {
2424
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2425
            unset($this->collectionDeletions[$oid]);
2426
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2427
        }
2428
    }
2429
2430
    /**
2431
     * INTERNAL:
@@ 2458-2466 (lines=9) @@
2455
     *
2456
     * @param \Doctrine\ODM\MongoDB\PersistentCollection $coll
2457
     */
2458
    public function unscheduleCollectionUpdate(PersistentCollection $coll)
2459
    {
2460
        $oid = spl_object_hash($coll);
2461
        if (isset($this->collectionUpdates[$oid])) {
2462
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2463
            unset($this->collectionUpdates[$oid]);
2464
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2465
        }
2466
    }
2467
2468
    /**
2469
     * Checks whether a PersistentCollection is scheduled for update.