Code Duplication    Length = 3-3 lines in 4 locations

lib/Doctrine/ODM/MongoDB/Query/ReferencePrimer.php 1 location

@@ 84-86 (lines=3) @@
81
                $qb->slaveOkay(true);
82
            }
83
84
            if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
85
                $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
86
            }
87
88
            $qb->getQuery()->execute()->toArray(false);
89
        };

lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php 3 locations

@@ 777-779 (lines=3) @@
774
            if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
775
                $cursor->slaveOkay(true);
776
            }
777
            if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
778
                $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
779
            }
780
            $documents = $cursor->toArray(false);
781
            foreach ($documents as $documentData) {
782
                $document = $this->uow->getById($documentData['_id'], $class);
@@ 840-842 (lines=3) @@
837
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
838
            $qb->slaveOkay(true);
839
        }
840
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
841
            $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
842
        }
843
        foreach ($mapping['prime'] as $field) {
844
            $qb->field($field)->prime(true);
845
        }
@@ 904-906 (lines=3) @@
901
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
902
            $cursor->slaveOkay(true);
903
        }
904
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
905
            $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
906
        }
907
908
        return $cursor;
909
    }