Code Duplication    Length = 4-4 lines in 2 locations

app/lib/FFCMS/Controllers/API/Mapper.php 2 locations

@@ 136-139 (lines=4) @@
133
        // load object by correct id
134
        $m = $this->getMapper();
135
        $m->load([$m->quotekey($idField) . ' = ?', $id]);
136
        if (null == $m->$idField) {
137
            $this->failure('authentication_error', "Object with @id does not exist.", 404);
138
            return $this->setOAuthError('invalid_request');
139
        }
140
141
        $this->mapper =& $m;
142
        return $m;
@@ 183-186 (lines=4) @@
180
        // check id exists
181
        $m = $this->getMapper();
182
        $m->load([$m->quotekey($idField) . ' = ?', $id]);
183
        if (null == $m->$idField) {
184
            $this->failure('authentication_error', "Object with @id does not exist.", 404);
185
            return $this->setOAuthError('invalid_request');
186
        }
187
188
        $this->mapper =& $m;
189
        return $m;