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 = 18-18 lines in 2 locations

phpmyfaq/inc/PMF/Search/Elasticsearch.php 2 locations

@@ 105-122 (lines=18) @@
102
103
        $result = $this->client->search($searchParams);
104
105
        if (0 !== $result['hits']['total']) {
106
107
            foreach ($result['hits']['hits'] as $hit) {
108
                $resultSet = new stdClass();
109
                $resultSet->id = $hit['_source']['id'];
110
                $resultSet->lang = $hit['_source']['lang'];
111
                $resultSet->question = $hit['_source']['question'];
112
                $resultSet->answer = $hit['_source']['answer'];
113
                $resultSet->keywords = $hit['_source']['keywords'];
114
                $resultSet->category_id = $hit['_source']['category_id'];
115
                $resultSet->score = $hit['_score'];
116
117
                $this->resultSet[] = $resultSet;
118
            }
119
120
        } else {
121
            $this->resultSet = [];
122
        }
123
124
        return $this->resultSet;
125
    }
@@ 166-183 (lines=18) @@
163
164
        $result = $this->client->search($searchParams);
165
166
        if (0 !== $result['hits']['total']) {
167
168
            foreach ($result['hits']['hits'] as $hit) {
169
                $resultSet = new stdClass();
170
                $resultSet->id = $hit['_source']['id'];
171
                $resultSet->lang = $hit['_source']['lang'];
172
                $resultSet->question = $hit['_source']['question'];
173
                $resultSet->answer = $hit['_source']['answer'];
174
                $resultSet->keywords = $hit['_source']['keywords'];
175
                $resultSet->category_id = $hit['_source']['category_id'];
176
                $resultSet->score = $hit['_score'];
177
178
                $this->resultSet[] = $resultSet;
179
            }
180
181
        } else {
182
            $this->resultSet = [];
183
        }
184
185
        return $this->resultSet;
186
    }