Code Duplication    Length = 9-9 lines in 2 locations

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

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