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 = 28-30 lines in 2 locations

phpmyfaq/inc/PMF/Perm/Basic.php 1 location

@@ 335-362 (lines=28) @@
332
     * @param  array   $right_data Array of rights
333
     * @return boolean
334
     */
335
    public function changeRight($right_id, Array $right_data)
336
    {
337
        $checked_data = $this->checkRightData($right_data);
338
        $set          = '';
339
        $comma        = '';
340
        foreach ($right_data as $key => $val) {
341
            $set .= $comma.$key." = '".$checked_data[$key]."'";
342
            $comma = ",\n                ";
343
        }
344
        
345
        $update = sprintf("
346
            UPDATE
347
                %sfaqright
348
            SET
349
                %s
350
            WHERE
351
                right_id = %d",
352
            PMF_Db::getTablePrefix(),
353
            $set,
354
            $right_id);
355
            
356
        $res = $this->config->getDb()->query($update);
357
        if (!$res) {
358
            return false;
359
        }
360
            
361
        return true;
362
    }
363
364
    /**
365
     * Deletes the right from the database.

phpmyfaq/inc/PMF/Perm/Medium.php 1 location

@@ 289-318 (lines=30) @@
286
     *
287
     * @return boolean
288
     */
289
    public function changeGroup($groupId, Array $groupData)
290
    {
291
        $checked_data = $this->checkGroupData($groupData);
292
        $set          = '';
293
        $comma        = '';
294
        
295
        foreach ($groupData as $key => $val) {
296
            $set  .= $comma.$key." = '".$this->config->getDb()->escape($checked_data[$key])."'";
297
            $comma = ",\n                ";
298
        }
299
        
300
        $update = sprintf("
301
            UPDATE
302
                %sfaqgroup
303
            SET
304
                %s
305
            WHERE
306
                group_id = %d",
307
            PMF_Db::getTablePrefix(),
308
            $set,
309
            $groupId
310
        );
311
                
312
        $res = $this->config->getDb()->query($update);
313
        
314
        if (!$res) {
315
            return false;
316
        }
317
        return true;
318
    }
319
320
    /**
321
     * Removes the group given by $groupId from the database.