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-20 lines in 3 locations

src/LPTracker/LPTracker.php 3 locations

@@ 216-235 (lines=20) @@
213
     * @return Contact
214
     * @throws LPTrackerSDKException
215
     */
216
    public function getContact($contact)
217
    {
218
        if ($contact instanceof Contact) {
219
            $contact = $contact->getId();
220
        } else {
221
            $contact = intval($contact);
222
        }
223
224
        if ($contact <= 0) {
225
            throw new LPTrackerSDKException('Invalid contact ID');
226
        }
227
228
        $url = '/contact/'.$contact;
229
230
        $response = LPTrackerRequest::sendRequest($url, [], 'GET', $this->token, $this->address);
231
232
        $resultContact = new Contact($response);
233
234
        return $resultContact;
235
    }
236
237
238
    /**
@@ 454-473 (lines=20) @@
451
     * @return View
452
     * @throws LPTrackerSDKException
453
     */
454
    public function getView($view)
455
    {
456
        if ($view instanceof View) {
457
            $view = $view->getId();
458
        } else {
459
            $view = intval($view);
460
        }
461
462
        if ($view <= 0) {
463
            throw new LPTrackerSDKException('Invalid view ID');
464
        }
465
466
        $url = '/view/'.$view;
467
468
        $response = LPTrackerRequest::sendRequest($url, [], 'GET', $this->token, $this->address);
469
470
        $resultView = new View($response);
471
472
        return $resultView;
473
    }
474
475
476
    /**
@@ 571-590 (lines=20) @@
568
     * @return Lead
569
     * @throws LPTrackerSDKException
570
     */
571
    public function getLead($lead)
572
    {
573
        if ($lead instanceof Lead) {
574
            $lead = $lead->getId();
575
        } else {
576
            $lead = intval($lead);
577
        }
578
579
        if ($lead <= 0) {
580
            throw new LPTrackerSDKException('Invalid lead ID');
581
        }
582
583
        $url = '/lead/'.$lead;
584
585
        $response = LPTrackerRequest::sendRequest($url, [], 'GET', $this->token, $this->address);
586
587
        $resultLead = new Lead($response);
588
589
        return $resultLead;
590
    }
591
592
593
    /**