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

@@ 2578-2605 (lines=28) @@
2575
     *
2576
     * @return array
2577
     */
2578
    public function getChangeEntries($recordId)
2579
    {
2580
        $entries = [];
2581
2582
        $query = sprintf('
2583
            SELECT
2584
                DISTINCT revision_id, usr, datum, what
2585
            FROM
2586
                %sfaqchanges
2587
            WHERE
2588
                beitrag = %d
2589
            ORDER BY revision_id DESC',
2590
            PMF_Db::getTablePrefix(),
2591
            $recordId
2592
        );
2593
2594
        if ($result = $this->_config->getDb()->query($query)) {
2595
            while ($row = $this->_config->getDb()->fetchObject($result)) {
2596
                $entries[] = array(
2597
                    'revision_id' => $row->revision_id,
2598
                    'user' => $row->usr,
2599
                    'date' => $row->datum,
2600
                    'changelog' => $row->what, );
2601
            }
2602
        }
2603
2604
        return $entries;
2605
    }
2606
2607
    /**
2608
     * Retrieve faq records according to the constraints provided.

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.