Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 514-522 (lines=9) @@
511
     *
512
     * Embedded documents will not be processed.
513
     */
514
    private function computeScheduleInsertsChangeSets()
515
    {
516
        foreach ($this->documentInsertions as $document) {
517
            $class = $this->dm->getClassMetadata(get_class($document));
518
            if ( ! $class->isEmbeddedDocument) {
519
                $this->computeChangeSet($class, $document);
520
            }
521
        }
522
    }
523
524
    /**
525
     * Compute changesets of all documents scheduled for upsert.
@@ 529-537 (lines=9) @@
526
     *
527
     * Embedded documents will not be processed.
528
     */
529
    private function computeScheduleUpsertsChangeSets()
530
    {
531
        foreach ($this->documentUpserts as $document) {
532
            $class = $this->dm->getClassMetadata(get_class($document));
533
            if ( ! $class->isEmbeddedDocument) {
534
                $this->computeChangeSet($class, $document);
535
            }
536
        }
537
    }
538
539
    /**
540
     * Only flush the given document according to a ruleset that keeps the UoW consistent.