Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 2436-2444 (lines=9) @@
2433
     *
2434
     * @param PersistentCollectionInterface $coll
2435
     */
2436
    public function unscheduleCollectionDeletion(PersistentCollectionInterface $coll)
2437
    {
2438
        $oid = spl_object_hash($coll);
2439
        if (isset($this->collectionDeletions[$oid])) {
2440
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2441
            unset($this->collectionDeletions[$oid]);
2442
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2443
        }
2444
    }
2445
2446
    /**
2447
     * INTERNAL:
@@ 2474-2482 (lines=9) @@
2471
     *
2472
     * @param PersistentCollectionInterface $coll
2473
     */
2474
    public function unscheduleCollectionUpdate(PersistentCollectionInterface $coll)
2475
    {
2476
        $oid = spl_object_hash($coll);
2477
        if (isset($this->collectionUpdates[$oid])) {
2478
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2479
            unset($this->collectionUpdates[$oid]);
2480
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2481
        }
2482
    }
2483
2484
    /**
2485
     * Checks whether a PersistentCollection is scheduled for update.