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

src/LPTracker/LPTracker.php 2 locations

@@ 503-520 (lines=18) @@
500
     * @return View
501
     * @throws LPTrackerSDKException
502
     */
503
    public function saveView(View $view)
504
    {
505
        if ( ! $view->validate()) {
506
            throw new LPTrackerSDKException('Invalid view');
507
        }
508
509
        if ($view->getId() > 0) {
510
            $url = '/view/'.$view->getId();
511
512
            $response = LPTrackerRequest::sendRequest($url, $view->toArray(), 'PUT', $this->token, $this->address);
513
        } else {
514
            $response = LPTrackerRequest::sendRequest('/view', $view->toArray(), 'POST', $this->token, $this->address);
515
        }
516
517
        $resultView = new View($response);
518
519
        return $resultView;
520
    }
521
522
523
    /**
@@ 620-638 (lines=19) @@
617
     * @return Lead
618
     * @throws LPTrackerSDKException
619
     */
620
    public function saveLead(Lead $lead)
621
    {
622
        if ( ! $lead->validate()) {
623
            throw new LPTrackerSDKException('Invalid lead');
624
        }
625
626
        if ($lead->getId() > 0) {
627
            $url = '/lead/'.$lead->getId();
628
629
            $response = LPTrackerRequest::sendRequest($url, $lead->toArray(true), 'PUT', $this->token, $this->address);
630
        } else {
631
            $response = LPTrackerRequest::sendRequest('/lead', $lead->toArray(true), 'POST', $this->token,
632
                $this->address);
633
        }
634
635
        $resultLead = new Lead($response);
636
637
        return $resultLead;
638
    }
639
640
641
    /**