GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 29-32 lines in 2 locations

phpmyfaq/src/phpMyFAQ/Permission/MediumPermission.php 2 locations

@@ 193-224 (lines=32) @@
190
     * 
191
     * @return bool
192
     */
193
    public function grantGroupRight($groupId, $rightId)
194
    {
195
        // check input
196
        if ($rightId <= 0 || $groupId <= 0 || !is_numeric($rightId) || !is_numeric($groupId)) {
197
            return false;
198
        }
199
200
        // is right for users?
201
        $right_data = $this->getRightData($rightId);
202
        if (!$right_data['for_groups']) {
203
            return false;
204
        }
205
206
        // grant right
207
        $insert = sprintf('
208
            INSERT INTO
209
                %sfaqgroup_right
210
            (group_id, right_id)
211
                VALUES
212
            (%d, %d)',
213
            Db::getTablePrefix(),
214
            $groupId,
215
            $rightId
216
        );
217
218
        $res = $this->config->getDb()->query($insert);
219
        if (!$res) {
220
            return false;
221
        }
222
223
        return true;
224
    }
225
226
    /**
227
     * Refuses the group given by $groupId the right specified by
@@ 491-519 (lines=29) @@
488
     *
489
     * @return bool
490
     */
491
    public function addToGroup($userId, $groupId)
492
    {
493
        if ($userId <= 0 || $groupId <= 0 || !is_numeric($userId) || !is_numeric($groupId)) {
494
            return false;
495
        }
496
497
        if (!$this->getGroupData($groupId)) {
498
            return false;
499
        }
500
501
        // add user to group
502
        $insert = sprintf('
503
            INSERT INTO
504
                %sfaquser_group
505
            (user_id, group_id)
506
               VALUES
507
            (%d, %d)',
508
            Db::getTablePrefix(),
509
            $userId,
510
            $groupId
511
        );
512
513
        $res = $this->config->getDb()->query($insert);
514
        if (!$res) {
515
            return false;
516
        }
517
518
        return true;
519
    }
520
521
    /**
522
     * Removes a user $userId from the group $groupId.