Code Duplication    Length = 9-9 lines in 2 locations

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

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