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/Category.php 1 location

@@ 876-901 (lines=26) @@
873
     * @param  integer $record_lang record language
874
     * @return array
875
     */
876
    public function getCategoryRelationsFromArticle($record_id, $record_lang)
877
    {
878
        $categories = [];
879
880
        $query = sprintf("
881
            SELECT
882
                category_id, category_lang
883
            FROM
884
                %sfaqcategoryrelations
885
            WHERE
886
                record_id = %d
887
            AND
888
                record_lang = '%s'",
889
            PMF_Db::getTablePrefix(),
890
            $record_id,
891
            $record_lang);
892
893
        $result = $this->_config->getDb()->query($query);
894
        while ($row = $this->_config->getDb()->fetchObject($result)) {
895
            $categories[] = array(
896
                'category_id'   => $row->category_id,
897
                'category_lang' => $row->category_lang);
898
        }
899
900
        return $categories;
901
    }
902
903
    /**
904
     * Returns all categories that are related to the given article-id and

phpmyfaq/inc/PMF/Session.php 1 location

@@ 193-222 (lines=30) @@
190
     *
191
     * @return array
192
     */
193
    public function getSessionsbyDate($firstHour, $lastHour)
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
            PMF_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