Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 328-338 (lines=11) @@
325
     * @param \Base $f3
326
     * @return null|array|boolean
327
     */
328
    public function listingAdmin(\Base $f3)
329
    {
330
        // must be an admin
331
        $isAdmin = $f3->get('isAdmin');
332
        if (!$isAdmin) {
333
            $this->failure('authentication_error', "User does not have permission.", 401);
334
            return $this->setOAuthError('access_denied');
335
        }
336
337
        $this->data = $this->getListingResults($f3, $this->getMapper());
338
    }
339
340
341
    /**
@@ 372-382 (lines=11) @@
369
     * @param \Base $f3
370
     * @return null|array|boolean
371
     */
372
    public function searchAdmin(\Base $f3)
373
    {
374
        // must be an admin
375
        $isAdmin = $f3->get('isAdmin');
376
        if (!$isAdmin) {
377
            $this->failure('authentication_error', "User does not have permission.", 401);
378
            return $this->setOAuthError('access_denied');
379
        }
380
381
        $this->data = $this->getSearchResults($f3, $this->getMapper());
382
    }
383
384
385
    /**