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 = 25-28 lines in 3 locations

phpmyfaq/inc/PMF/Faq.php 1 location

@@ 2331-2358 (lines=28) @@
2328
     * @since   2007-03-03
2329
     * @author  Thorsten Rinne <[email protected]>
2330
     */
2331
    function getChangeEntries($record_id)
2332
    {
2333
        $entries = [];
2334
2335
        $query = sprintf("
2336
            SELECT
2337
                DISTINCT revision_id, usr, datum, what
2338
            FROM
2339
                %sfaqchanges
2340
            WHERE
2341
                beitrag = %d
2342
            ORDER BY id DESC",
2343
            PMF_Db::getTablePrefix(),
2344
            $record_id
2345
            );
2346
2347
       if ($result = $this->_config->getDb()->query($query)) {
2348
            while ($row = $this->_config->getDb()->fetchObject($result)) {
2349
                $entries[] = array(
2350
                    'revision_id'   => $row->revision_id,
2351
                    'user'          => $row->usr,
2352
                    'date'          => $row->datum,
2353
                    'changelog'     => $row->what);
2354
            }
2355
        }
2356
2357
        return $entries;
2358
    }
2359
2360
    /**
2361
     * Retrieve faq records according to the constraints provided

phpmyfaq/inc/PMF/Logging.php 1 location

@@ 79-103 (lines=25) @@
76
     *
77
     * @return array
78
     */
79
    public function getAll()
80
    {
81
        $data = [];
82
83
        $query = sprintf('
84
            SELECT
85
                id, time, usr, text, ip
86
            FROM
87
                %sfaqadminlog
88
            ORDER BY id DESC',
89
            PMF_Db::getTablePrefix()
90
        );
91
92
        $result = $this->_config->getDb()->query($query);
93
        while ($row = $this->_config->getDb()->fetchObject($result)) {
94
            $data[$row->id] = array(
95
               'time'  => $row->time,
96
               'usr'   => $row->usr,
97
               'text'  => $row->text,
98
               'ip'    => $row->ip
99
            );
100
        }
101
102
        return $data;
103
    }
104
    
105
    /**
106
     * Adds a new adminlog entry

phpmyfaq/inc/PMF/Visits.php 1 location

@@ 153-178 (lines=26) @@
150
     *
151
     * @return array
152
     */
153
    public function getAllData()
154
    {
155
        $data = [];
156
157
        $query = sprintf("
158
            SELECT
159
                *
160
             FROM
161
                %sfaqvisits
162
             ORDER BY
163
                visits DESC",
164
            PMF_Db::getTablePrefix()
165
            );
166
        $result = $this->_config->getDb()->query($query);
167
168
        while ($row = $this->_config->getDb()->fetchObject($result)) {
169
            $data[] = array(
170
                'id'         => $row->id,
171
                'lang'       => $row->lang,
172
                'visits'     => $row->visits,
173
                'last_visit' => $row->last_visit
174
            );
175
        }
176
177
        return $data;
178
    }
179
}