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

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