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

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