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

@@ 165-183 (lines=19) @@
162
     * @return Contact
163
     * @throws LPTrackerSDKException
164
     */
165
    public function saveContact(Contact $contact)
166
    {
167
        if ( ! $contact->validate()) {
168
            throw new LPTrackerSDKException('Invalid contact');
169
        }
170
171
        if ($contact->getId() > 0) {
172
            $url = '/contact/'.$contact->getId();
173
174
            $response = LPTrackerRequest::sendRequest($url, $contact->toArray(), 'PUT', $this->token, $this->address);
175
        } else {
176
            $response = LPTrackerRequest::sendRequest('/contact', $contact->toArray(), 'POST', $this->token,
177
                $this->address);
178
        }
179
180
        $resultContact = new Contact($response);
181
182
        return $resultContact;
183
    }
184
185
186
    /**
@@ 253-270 (lines=18) @@
250
     * @return Lead
251
     * @throws LPTrackerSDKException
252
     */
253
    public function saveLead(Lead $lead)
254
    {
255
        if ( ! $lead->validate()) {
256
            throw new LPTrackerSDKException('Invalid lead');
257
        }
258
259
        if ($lead->getId() > 0) {
260
            $url = '/lead/'.$lead->getId();
261
262
            $response = LPTrackerRequest::sendRequest($url, $lead->toArray(), 'PUT', $this->token, $this->address);
263
        } else {
264
            $response = LPTrackerRequest::sendRequest('/lead', $lead->toArray(), 'POST', $this->token, $this->address);
265
        }
266
267
        $resultLead = new Lead($response);
268
269
        return $resultLead;
270
    }
271
272
273
    /**