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

src/LPTracker/LPTracker.php 2 locations

@@ 714-731 (lines=18) @@
711
     * @return Lead
712
     * @throws LPTrackerSDKException
713
     */
714
    public function changeLeadFunnel($lead, $newFunnelId)
715
    {
716
        if ($lead instanceof Lead) {
717
            $lead = $lead->getId();
718
        }
719
720
        $url = '/lead/'.$lead.'/funnel';
721
722
        $data = [
723
            'funnel' => $newFunnelId
724
        ];
725
726
        $response = LPTrackerRequest::sendRequest($url, $data, 'PUT', $this->token, $this->address);
727
728
        $resultLead = new Lead($response);
729
730
        return $resultLead;
731
    }
732
733
734
    /**
@@ 770-789 (lines=20) @@
767
     * @throws exceptions\LPTrackerResponseException
768
     * @throws exceptions\LPTrackerServerException
769
     */
770
    public function addCommentToLead($lead, $text)
771
    {
772
        if ($lead instanceof Lead) {
773
            $lead = $lead->getId();
774
        } else {
775
            $lead = intval($lead);
776
        }
777
778
        $url = '/lead/'.$lead.'/comment';
779
780
        $data = [
781
            'text' => $text
782
        ];
783
784
        $response = LPTrackerRequest::sendRequest($url, $data, 'POST', $this->token, $this->address);
785
786
        $comment = new Comment($response);
787
788
        return $comment;
789
    }
790
791
    /**
792
     * @param Lead|int   $lead