Code Duplication    Length = 3-3 lines in 4 locations

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

@@ 708-710 (lines=3) @@
705
            if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
706
                $cursor->slaveOkay(true);
707
            }
708
            if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
709
                $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
710
            }
711
            $documents = $cursor->toArray(false);
712
            foreach ($documents as $documentData) {
713
                $document = $this->uow->getById($documentData['_id'], $class);
@@ 768-770 (lines=3) @@
765
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
766
            $qb->slaveOkay(true);
767
        }
768
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
769
            $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
770
        }
771
772
        return $qb->getQuery();
773
    }
@@ 818-820 (lines=3) @@
815
        if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) {
816
            $cursor->slaveOkay(true);
817
        }
818
        if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) {
819
            $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]);
820
        }
821
822
        return $cursor;
823
    }

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

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