Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 2429-2437 (lines=9) @@
2426
     *
2427
     * @param PersistentCollectionInterface $coll
2428
     */
2429
    public function unscheduleCollectionDeletion(PersistentCollectionInterface $coll)
2430
    {
2431
        $oid = spl_object_hash($coll);
2432
        if (isset($this->collectionDeletions[$oid])) {
2433
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2434
            unset($this->collectionDeletions[$oid]);
2435
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2436
        }
2437
    }
2438
2439
    /**
2440
     * INTERNAL:
@@ 2467-2475 (lines=9) @@
2464
     *
2465
     * @param PersistentCollectionInterface $coll
2466
     */
2467
    public function unscheduleCollectionUpdate(PersistentCollectionInterface $coll)
2468
    {
2469
        $oid = spl_object_hash($coll);
2470
        if (isset($this->collectionUpdates[$oid])) {
2471
            $topmostOwner = $this->getOwningDocument($coll->getOwner());
2472
            unset($this->collectionUpdates[$oid]);
2473
            unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]);
2474
        }
2475
    }
2476
2477
    /**
2478
     * Checks whether a PersistentCollection is scheduled for update.