Code Duplication    Length = 5-5 lines in 2 locations

lib/Doctrine/ODM/MongoDB/Query/Expr.php 2 locations

@@ 109-113 (lines=5) @@
106
            foreach ($keys as $key => $value) {
107
                $this->query[$mapping['name'] . '.' . $key] = $reference[$key];
108
            }
109
        } else {
110
            @trigger_error('Calling ' . __METHOD__ . ' without a current field set will no longer be possible in ODM 2.0.', E_USER_DEPRECATED);
111
112
            $this->query = $this->dm->createDBRef($document);
113
        }
114
115
        return $this;
116
    }
@@ 161-165 (lines=5) @@
158
            foreach ($keys as $key => $value) {
159
                $this->query[$mapping['name']]['$elemMatch'][$key] = $reference[$key];
160
            }
161
        } else {
162
            @trigger_error('Calling ' . __METHOD__ . ' without a current field set will no longer be possible in ODM 2.0.', E_USER_DEPRECATED);
163
164
            $this->query['$elemMatch'] = $this->dm->createDBRef($document);
165
        }
166
167
        return $this;
168
    }