Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 2407-2415 (lines=9) @@
2404
     *
2405
     * @param PersistentCollectionInterface $coll
2406
     */
2407
    public function unscheduleCollectionDeletion(PersistentCollectionInterface $coll)
2408
    {
2409
        $oid = spl_object_hash($coll);
2410
        if (isset($this->collectionDeletions[$oid])) {
2411
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2412
            unset($this->collectionDeletions[$oid]);
2413
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2414
        }
2415
    }
2416
2417
    /**
2418
     * INTERNAL:
@@ 2445-2453 (lines=9) @@
2442
     *
2443
     * @param PersistentCollectionInterface $coll
2444
     */
2445
    public function unscheduleCollectionUpdate(PersistentCollectionInterface $coll)
2446
    {
2447
        $oid = spl_object_hash($coll);
2448
        if (isset($this->collectionUpdates[$oid])) {
2449
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2450
            unset($this->collectionUpdates[$oid]);
2451
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2452
        }
2453
    }
2454
2455
    /**
2456
     * Checks whether a PersistentCollection is scheduled for update.