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

@@ 757-759 (lines=3) @@
754
            if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
755
                $cursor->slaveOkay(true);
756
            }
757
            if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
758
                $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
759
            }
760
            $documents = $cursor->toArray(false);
761
            foreach ($documents as $documentData) {
762
                $document = $this->uow->getById($documentData['_id'], $class);
@@ 817-819 (lines=3) @@
814
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
815
            $qb->slaveOkay(true);
816
        }
817
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
818
            $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
819
        }
820
821
        return $qb->getQuery();
822
    }
@@ 867-869 (lines=3) @@
864
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
865
            $cursor->slaveOkay(true);
866
        }
867
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
868
            $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
869
        }
870
871
        return $cursor;
872
    }