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

src/LPTracker/LPTracker.php 2 locations

@@ 481-498 (lines=18) @@
478
     * @return View
479
     * @throws LPTrackerSDKException
480
     */
481
    public function saveView(View $view)
482
    {
483
        if ( ! $view->validate()) {
484
            throw new LPTrackerSDKException('Invalid view');
485
        }
486
487
        if ($view->getId() > 0) {
488
            $url = '/view/'.$view->getId();
489
490
            $response = LPTrackerRequest::sendRequest($url, $view->toArray(), 'PUT', $this->token, $this->address);
491
        } else {
492
            $response = LPTrackerRequest::sendRequest('/view', $view->toArray(), 'POST', $this->token, $this->address);
493
        }
494
495
        $resultView = new View($response);
496
497
        return $resultView;
498
    }
499
500
501
    /**
@@ 590-607 (lines=18) @@
587
     * @return Lead
588
     * @throws LPTrackerSDKException
589
     */
590
    public function saveLead(Lead $lead)
591
    {
592
        if ( ! $lead->validate()) {
593
            throw new LPTrackerSDKException('Invalid lead');
594
        }
595
596
        if ($lead->getId() > 0) {
597
            $url = '/lead/'.$lead->getId();
598
599
            $response = LPTrackerRequest::sendRequest($url, $lead->toArray(), 'PUT', $this->token, $this->address);
600
        } else {
601
            $response = LPTrackerRequest::sendRequest('/lead', $lead->toArray(), 'POST', $this->token, $this->address);
602
        }
603
604
        $resultLead = new Lead($response);
605
606
        return $resultLead;
607
    }
608
609
610
    /**