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

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