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

phpmyfaq/inc/PMF/User.php 2 locations

@@ 908-937 (lines=30) @@
905
     *
906
     * @return array
907
     */
908
    public function getAllUsers($withoutAnonymous = true, $allowBlockedUsers = true)
909
    {
910
        $select = sprintf("
911
            SELECT
912
                user_id
913
            FROM
914
                %sfaquser
915
            WHERE
916
                1 = 1
917
            %s
918
            %s
919
            ORDER BY
920
                user_id ASC",
921
            PMF_Db::getTablePrefix(),
922
            ($withoutAnonymous ? 'AND user_id <> -1' : ''),
923
            ($allowBlockedUsers ? '' : "AND account_status != 'blocked'")
924
        );
925
926
        $res = $this->config->getDb()->query($select);
927
        if (!$res) {
928
            return array();
929
        }
930
931
        $result = array();
932
        while ($row = $this->config->getDb()->fetchArray($res)) {
933
            $result[] = $row['user_id'];
934
        }
935
936
        return $result;
937
    }
938
939
    /**
940
     * Returns an array of all users found in the database. By default, the 
@@ 948-972 (lines=25) @@
945
     * @param  boolean $withoutAnonymous Without anonymous?
946
     * @return array
947
     */
948
    public function getAllUserData($withoutAnonymous = true)
949
    {
950
        $select = sprintf("
951
            SELECT
952
                user_id, login, account_status, auth_source, member_since
953
            FROM
954
                %sfaquser
955
            %s
956
            ORDER BY
957
               login ASC",
958
            PMF_Db::getTablePrefix(),
959
            ($withoutAnonymous ? 'WHERE user_id <> -1' : ''));
960
961
        $res = $this->config->getDb()->query($select);
962
        if (!$res) {
963
            return array();
964
        }
965
966
        $result = array();
967
        while ($row = $this->config->getDb()->fetchArray($res)) {
968
            $result[$row['user_id']] = $row;
969
        }
970
971
        return $result;
972
    }
973
    
974
    /**
975
     * Get all users in <option> tags