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

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

phpmyfaq/inc/PMF/Category.php 1 location

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