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

phpmyfaq/inc/PMF/Session.php 1 location

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

phpmyfaq/inc/PMF/Category.php 1 location

@@ 907-932 (lines=26) @@
904
     *
905
     * @return array
906
     */
907
    public function getCategoryRelationsFromArticle($record_id, $record_lang)
908
    {
909
        $categories = [];
910
911
        $query = sprintf("
912
            SELECT
913
                category_id, category_lang
914
            FROM
915
                %sfaqcategoryrelations
916
            WHERE
917
                record_id = %d
918
            AND
919
                record_lang = '%s'",
920
            PMF_Db::getTablePrefix(),
921
            $record_id,
922
            $record_lang);
923
924
        $result = $this->_config->getDb()->query($query);
925
        while ($row = $this->_config->getDb()->fetchObject($result)) {
926
            $categories[$row->category_id] = array(
927
                'category_id' => $row->category_id,
928
                'category_lang' => $row->category_lang, );
929
        }
930
931
        return $categories;
932
    }
933
934
    /**
935
     * Returns all categories that are related to the given article-id and