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

@@ 769-771 (lines=3) @@
766
            if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
767
                $cursor->slaveOkay(true);
768
            }
769
            if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
770
                $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
771
            }
772
            $documents = $cursor->toArray(false);
773
            foreach ($documents as $documentData) {
774
                $document = $this->uow->getById($documentData['_id'], $class);
@@ 831-833 (lines=3) @@
828
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
829
            $qb->slaveOkay(true);
830
        }
831
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
832
            $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
833
        }
834
        foreach ($mapping['prime'] as $field) {
835
            $qb->field($field)->prime(true);
836
        }
@@ 895-897 (lines=3) @@
892
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
893
            $cursor->slaveOkay(true);
894
        }
895
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
896
            $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
897
        }
898
899
        return $cursor;
900
    }