Code Duplication    Length = 3-3 lines in 4 locations

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

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

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

@@ 717-719 (lines=3) @@
714
            if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
715
                $cursor->slaveOkay(true);
716
            }
717
            if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
718
                $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
719
            }
720
            $documents = $cursor->toArray(false);
721
            foreach ($documents as $documentData) {
722
                $document = $this->uow->getById($documentData['_id'], $class);
@@ 777-779 (lines=3) @@
774
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
775
            $qb->slaveOkay(true);
776
        }
777
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
778
            $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
779
        }
780
781
        return $qb->getQuery();
782
    }
@@ 827-829 (lines=3) @@
824
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
825
            $cursor->slaveOkay(true);
826
        }
827
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
828
            $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
829
        }
830
831
        return $cursor;
832
    }