Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 260-270 (lines=11) @@
257
     * @param \Base $f3
258
     * @return null|array|boolean
259
     */
260
    public function listingAdmin(\Base $f3)
261
    {
262
        // must be an admin
263
        $isAdmin = $f3->get('isAdmin');
264
        if (!$isAdmin) {
265
            $this->failure('authentication_error', "User does not have permission.", 401);
266
            return $this->setOAuthError('access_denied');
267
        }
268
269
        $this->data = $this->getListingResults($f3, $this->getMapper());
270
    }
271
272
273
    /**
@@ 306-316 (lines=11) @@
303
     * @param \Base $f3
304
     * @return null|array|boolean
305
     */
306
    public function searchAdmin(\Base $f3)
307
    {
308
        // must be an admin
309
        $isAdmin = $f3->get('isAdmin');
310
        if (!$isAdmin) {
311
            $this->failure('authentication_error', "User does not have permission.", 401);
312
            return $this->setOAuthError('access_denied');
313
        }
314
315
        $this->data = $this->getSearchResults($f3, $this->getMapper());
316
    }
317
318
319
    /**