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

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

phpmyfaq/inc/PMF/Category.php 1 location

@@ 922-947 (lines=26) @@
919
     *
920
     * @return array
921
     */
922
    public function getCategoryRelationsFromArticle($record_id, $record_lang)
923
    {
924
        $categories = [];
925
926
        $query = sprintf("
927
            SELECT
928
                category_id, category_lang
929
            FROM
930
                %sfaqcategoryrelations
931
            WHERE
932
                record_id = %d
933
            AND
934
                record_lang = '%s'",
935
            PMF_Db::getTablePrefix(),
936
            $record_id,
937
            $record_lang);
938
939
        $result = $this->_config->getDb()->query($query);
940
        while ($row = $this->_config->getDb()->fetchObject($result)) {
941
            $categories[$row->category_id] = array(
942
                'category_id' => $row->category_id,
943
                'category_lang' => $row->category_lang, );
944
        }
945
946
        return $categories;
947
    }
948
949
    /**
950
     * Returns all categories that are related to the given article-id and