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

phpmyfaq/src/phpMyFAQ/Category.php 1 location

@@ 1121-1147 (lines=27) @@
1118
     *
1119
     * @return array
1120
     */
1121
    public function getCategoryRelationsFromArticle($record_id, $record_lang)
1122
    {
1123
        $categories = [];
1124
1125
        $query = sprintf("
1126
            SELECT
1127
                category_id, category_lang
1128
            FROM
1129
                %sfaqcategoryrelations
1130
            WHERE
1131
                record_id = %d
1132
            AND
1133
                record_lang = '%s'",
1134
            Db::getTablePrefix(),
1135
            $record_id,
1136
            $record_lang);
1137
1138
        $result = $this->config->getDb()->query($query);
1139
        while ($row = $this->config->getDb()->fetchObject($result)) {
1140
            $categories[$row->category_id] = array(
1141
                'category_id' => $row->category_id,
1142
                'category_lang' => $row->category_lang,
1143
            );
1144
        }
1145
1146
        return $categories;
1147
    }
1148
1149
    /**
1150
     * Returns the ID of a category that associated with the given article.

phpmyfaq/src/phpMyFAQ/Session.php 1 location

@@ 193-222 (lines=30) @@
190
     *
191
     * @return array
192
     */
193
    public function getSessionsByDate(int $firstHour, int $lastHour): array
194
    {
195
        $sessions = [];
196
197
        $query = sprintf('
198
            SELECT
199
                sid, ip, time
200
            FROM
201
                %sfaqsessions
202
            WHERE
203
                time > %d
204
            AND
205
                time < %d
206
            ORDER BY
207
                time',
208
            Db::getTablePrefix(),
209
            $firstHour,
210
            $lastHour
211
        );
212
213
        $result = $this->config->getDb()->query($query);
214
        while ($row = $this->config->getDb()->fetchObject($result)) {
215
            $sessions[$row->sid] = array(
216
                'ip' => $row->ip,
217
                'time' => $row->time,
218
            );
219
        }
220
221
        return $sessions;
222
    }
223
224
    /**
225
     * Returns the number of sessions.