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

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

phpmyfaq/inc/PMF/Visits.php 1 location

@@ 155-180 (lines=26) @@
152
     *
153
     * @return array
154
     */
155
    public function getAllData()
156
    {
157
        $data = [];
158
159
        $query = sprintf('
160
            SELECT
161
                *
162
             FROM
163
                %sfaqvisits
164
             ORDER BY
165
                visits DESC',
166
            PMF_Db::getTablePrefix()
167
            );
168
        $result = $this->config->getDb()->query($query);
169
170
        while ($row = $this->config->getDb()->fetchObject($result)) {
171
            $data[] = [
172
                'id' => $row->id,
173
                'lang' => $row->lang,
174
                'visits' => $row->visits,
175
                'last_visit' => $row->last_visit,
176
            ];
177
        }
178
179
        return $data;
180
    }
181
182
    /**
183
     * Resets all visits to current date and one visit per FAQ.

phpmyfaq/inc/PMF/Faq.php 1 location

@@ 2541-2568 (lines=28) @@
2538
     *
2539
     * @author  Thorsten Rinne <[email protected]>
2540
     */
2541
    public function getChangeEntries($record_id)
2542
    {
2543
        $entries = [];
2544
2545
        $query = sprintf('
2546
            SELECT
2547
                DISTINCT revision_id, usr, datum, what
2548
            FROM
2549
                %sfaqchanges
2550
            WHERE
2551
                beitrag = %d
2552
            ORDER BY id DESC',
2553
            PMF_Db::getTablePrefix(),
2554
            $record_id
2555
            );
2556
2557
        if ($result = $this->_config->getDb()->query($query)) {
2558
            while ($row = $this->_config->getDb()->fetchObject($result)) {
2559
                $entries[] = array(
2560
                    'revision_id' => $row->revision_id,
2561
                    'user' => $row->usr,
2562
                    'date' => $row->datum,
2563
                    'changelog' => $row->what, );
2564
            }
2565
        }
2566
2567
        return $entries;
2568
    }
2569
2570
    /**
2571
     * Retrieve faq records according to the constraints provided.