Code Duplication    Length = 9-9 lines in 2 locations

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

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