Code Duplication    Length = 9-9 lines in 2 locations

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

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