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

src/Orange.php 2 locations

@@ 300-319 (lines=20) @@
297
     * @return boolean|array - false if not logged in, no valuable content
298
     *  otherwise array result of checkRemaining() function
299
     */
300
    public function getRemaining()
301
    {
302
303
        $this->checkLoggedIn();
304
305
        $response = $this->session->get($this->send_request_uri);
306
        $elements = $this->find($response->body, '#syndication p.item span.value');
307
308
        if (count($elements) > 0) {
309
310
            $result = $this->checkRemaining($elements);
311
312
        } else {
313
314
            $result = false;
315
316
        }
317
318
        return $result;
319
    }
320
321
    /**
322
     * Get the token through a request
@@ 326-347 (lines=22) @@
323
     *
324
     * @return string - token
325
     */
326
    public function getToken()
327
    {
328
329
        $this->checkLoggedIn();
330
331
        $response = $this->session->get($this->send_request_uri);
332
        $element = $this->find($response->body, 'div#box-smsform form input[name=/amg/ptk/map/messagebox/formhandlers/MessageFormHandler.token]', 0);
333
334
        if (count($element) > 0) {
335
336
            $result = $this->token($response->body);
337
            $this->token = $result;
338
339
        } else {
340
341
            $result = false;
342
343
        }
344
345
346
        return $result;
347
    }
348
349
    /**
350
     * Check whether errors have been returned