Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 82-85 (lines=4) @@
79
        $this->isAuthorised = $this->validateAccess();
80
        if (empty($this->isAuthorised)) {
81
            $this->setOAuthError('invalid_grant');
82
        } elseif (empty($f3->get('isAdmin')) && !empty($this->adminOnly)) {
83
            $this->failure('authentication_error', "User does not have permission.", 401);
84
            $this->setOAuthError('access_denied');
85
        } else {
86
            $this->isAuthorised = true;
87
        }
88
    }
@@ 123-126 (lines=4) @@
120
        $isAdmin = $f3->get('isAdmin');
121
        $id = !empty($params['id']) ? $params['id'] : $f3->get('REQUEST.id');
122
123
        if ((!$isAdmin && !empty($this->adminOnly))) {
124
            $this->failure('authentication_error', "User does not have permission.", 401);
125
            return $this->setOAuthError('access_denied');
126
        }
127
128
        // use default user id
129
        if (empty($id)) {