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

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