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

@@ 760-762 (lines=3) @@
757
            if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
758
                $cursor->slaveOkay(true);
759
            }
760
            if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
761
                $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
762
            }
763
            $documents = $cursor->toArray(false);
764
            foreach ($documents as $documentData) {
765
                $document = $this->uow->getById($documentData['_id'], $class);
@@ 820-822 (lines=3) @@
817
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
818
            $qb->slaveOkay(true);
819
        }
820
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
821
            $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
822
        }
823
824
        return $qb->getQuery();
825
    }
@@ 870-872 (lines=3) @@
867
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
868
            $cursor->slaveOkay(true);
869
        }
870
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
871
            $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
872
        }
873
874
        return $cursor;
875
    }