Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 499-507 (lines=9) @@
496
     *
497
     * Embedded documents will not be processed.
498
     */
499
    private function computeScheduleInsertsChangeSets()
500
    {
501
        foreach ($this->documentInsertions as $document) {
502
            $class = $this->dm->getClassMetadata(get_class($document));
503
            if ( ! $class->isEmbeddedDocument) {
504
                $this->computeChangeSet($class, $document);
505
            }
506
        }
507
    }
508
509
    /**
510
     * Compute changesets of all documents scheduled for upsert.
@@ 514-522 (lines=9) @@
511
     *
512
     * Embedded documents will not be processed.
513
     */
514
    private function computeScheduleUpsertsChangeSets()
515
    {
516
        foreach ($this->documentUpserts 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
     * Only flush the given document according to a ruleset that keeps the UoW consistent.