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 = 31-38 lines in 3 locations

phpmyfaq/inc/PMF/Perm/Medium.php 3 locations

@@ 69-101 (lines=33) @@
66
     * 
67
     * @return bool
68
     */
69
    public function checkGroupRight($groupId, $rightId)
70
    {
71
        // check input
72
        if ($rightId <= 0 || $groupId <= 0 || !is_numeric($rightId) || !is_numeric($groupId)) {
73
            return false;
74
        }
75
        
76
        // check right
77
        $select = sprintf("
78
            SELECT
79
                fr.right_id AS right_id
80
            FROM
81
                %sfaqright fr,
82
                %sfaqgroup_right fgr,
83
                %sfaqgroup fg
84
            WHERE
85
                fr.right_id = %d AND
86
                fr.right_id = fgr.right_id AND
87
                fg.group_id = fgr.group_id AND
88
                fg.group_id = %d",
89
            PMF_Db::getTablePrefix(),
90
            PMF_Db::getTablePrefix(),
91
            PMF_Db::getTablePrefix(),
92
            $rightId,
93
            $groupId
94
        );
95
        
96
        $res = $this->config->getDb()->query($select);
97
        if ($this->config->getDb()->numRows($res) == 1) {
98
            return true;
99
        }
100
        return false;
101
    }
102
103
    /**
104
     * Returns an array that contains the right-IDs of all
@@ 388-418 (lines=31) @@
385
     *
386
     * @return boolean
387
     */
388
    public function isGroupMember($userId, $groupId)
389
    {
390
        if ($userId <= 0 || $groupId <= 0 || !is_numeric($userId) || !is_numeric($groupId)) {
391
            return false;
392
        }
393
        
394
        $select = sprintf("
395
            SELECT
396
                fu.user_id AS user_id
397
            FROM
398
                %sfaquser fu,
399
                %sfaquser_group fug,
400
                %sfaqgroup fg
401
            WHERE
402
                fu.user_id  = %d AND
403
                fu.user_id  = fug.user_id AND
404
                fg.group_id = fug.group_id AND
405
                fg.group_id = %d",
406
            PMF_Db::getTablePrefix(),
407
            PMF_Db::getTablePrefix(),
408
            PMF_Db::getTablePrefix(),
409
            $userId,
410
            $groupId
411
        );
412
        
413
        $res = $this->config->getDb()->query($select);
414
        if ($this->config->getDb()->numRows($res) == 1) {
415
            return true;
416
        }
417
        return false;
418
    }
419
420
    /**
421
     * Returns an array that contains the user-IDs of all members
@@ 692-729 (lines=38) @@
689
     * @param  integer $rightId Right ID
690
     * @return boolean
691
     */
692
    public function checkUserGroupRight($userId, $rightId)
693
    {
694
        // check input
695
        if ($rightId <= 0 || $userId <= 0 || !is_numeric($rightId) || !is_numeric($userId)) {
696
            return false;
697
        }
698
        
699
        $select = sprintf("
700
            SELECT
701
                fr.right_id AS right_id
702
            FROM
703
                %sfaqright fr,
704
                %sfaqgroup_right fgr,
705
                %sfaqgroup fg,
706
                %sfaquser_group fug,
707
                %sfaquser fu
708
            WHERE
709
                fr.right_id = %d AND
710
                fr.right_id = fgr.right_id AND
711
                fg.group_id = fgr.group_id AND
712
                fg.group_id = fug.group_id AND
713
                fu.user_id  = fug.user_id AND
714
                fu.user_id  = %d",
715
            PMF_Db::getTablePrefix(),
716
            PMF_Db::getTablePrefix(),
717
            PMF_Db::getTablePrefix(),
718
            PMF_Db::getTablePrefix(),
719
            PMF_Db::getTablePrefix(),
720
            $rightId,
721
            $userId
722
        );
723
        
724
        $res = $this->config->getDb()->query($select);
725
        if ($this->config->getDb()->numRows($res) == 1) {
726
            return true;
727
        }
728
        return false;
729
    }
730
731
    /**
732
     * Checks the given associative array $groupData. If a