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

@@ 720-722 (lines=3) @@
717
            if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
718
                $cursor->slaveOkay(true);
719
            }
720
            if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
721
                $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
722
            }
723
            $documents = $cursor->toArray(false);
724
            foreach ($documents as $documentData) {
725
                $document = $this->uow->getById($documentData['_id'], $class);
@@ 780-782 (lines=3) @@
777
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
778
            $qb->slaveOkay(true);
779
        }
780
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
781
            $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
782
        }
783
784
        return $qb->getQuery();
785
    }
@@ 830-832 (lines=3) @@
827
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
828
            $cursor->slaveOkay(true);
829
        }
830
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
831
            $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
832
        }
833
834
        return $cursor;
835
    }