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 = 23-25 lines in 2 locations

phpmyfaq/src/phpMyFAQ/Permission/LargePermission.php 1 location

@@ 758-780 (lines=23) @@
755
     * @param int $sectionId
756
     * @return string
757
     */
758
    public function getSectionName($sectionId)
759
    {
760
        if (!is_numeric($sectionId) || $sectionId < 1) {
761
            return '-';
762
        }
763
        $select = sprintf('
764
            SELECT 
765
                name
766
            FROM 
767
                %sfaqsections
768
            WHERE
769
                id = %d',
770
            DB::getTablePrefix(),
771
            $sectionId
772
        );
773
        $res = $this->config->getDb()->query($select);
774
        if ($this->config->getDb()->numRows($res) != 1) {
775
            return '-';
776
        }
777
        $row = $this->config->getDb()->fetchArray($res);
778
779
        return $row['name'];
780
    }
781
782
    /**
783
     * Adds a new category $categoryId to the section $sectionId.

phpmyfaq/src/phpMyFAQ/Permission/MediumPermission.php 1 location

@@ 980-1004 (lines=25) @@
977
     *
978
     * @return string
979
     */
980
    public function getGroupName($groupId)
981
    {
982
        if ($groupId <= 0 || !is_numeric($groupId)) {
983
            return '-';
984
        }
985
986
        $select = sprintf('
987
            SELECT
988
                name
989
            FROM
990
                %sfaqgroup
991
            WHERE
992
                group_id = %d',
993
            Db::getTablePrefix(),
994
            $groupId
995
        );
996
997
        $res = $this->config->getDb()->query($select);
998
        if ($this->config->getDb()->numRows($res) != 1) {
999
            return '-';
1000
        }
1001
        $row = $this->config->getDb()->fetchArray($res);
1002
1003
        return $row['name'];
1004
    }
1005
1006
    /**
1007
     * Removes all users from the group $groupId.