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 = 16-29 lines in 2 locations

src/Storage.php 2 locations

@@ 234-249 (lines=16) @@
231
        return 1 === $stmt->rowCount();
232
    }
233
234
    public function addCertificate($externalUserId, $commonName, $displayName, $validFrom, $validTo)
235
    {
236
        $userId = $this->getUserId($externalUserId);
237
        $stmt = $this->db->prepare(
238
            'INSERT INTO certificates (common_name, user_id, display_name, valid_from, valid_to) VALUES(:common_name, :user_id, :display_name, :valid_from, :valid_to)'
239
        );
240
        $stmt->bindValue(':common_name', $commonName, PDO::PARAM_STR);
241
        $stmt->bindValue(':user_id', $userId, PDO::PARAM_STR);
242
        $stmt->bindValue(':display_name', $displayName, PDO::PARAM_STR);
243
        $stmt->bindValue(':valid_from', $validFrom, PDO::PARAM_INT);
244
        $stmt->bindValue(':valid_to', $validTo, PDO::PARAM_INT);
245
246
        $stmt->execute();
247
248
        return 1 === $stmt->rowCount();
249
    }
250
251
    public function getCertificates($externalUserId)
252
    {
@@ 354-382 (lines=29) @@
351
        return $stmt->fetchAll(PDO::FETCH_ASSOC);
352
    }
353
354
    public function clientConnect($profileId, $commonName, $ip4, $ip6, $connectedAt)
355
    {
356
        $stmt = $this->db->prepare(
357
            'INSERT INTO connection_log (
358
                profile_id,
359
                common_name,
360
                ip4,
361
                ip6,
362
                connected_at
363
             ) 
364
             VALUES(
365
                :profile_id, 
366
                :common_name,
367
                :ip4,
368
                :ip6,
369
                :connected_at
370
             )'
371
        );
372
373
        $stmt->bindValue(':profile_id', $profileId, PDO::PARAM_STR);
374
        $stmt->bindValue(':common_name', $commonName, PDO::PARAM_STR);
375
        $stmt->bindValue(':ip4', $ip4, PDO::PARAM_STR);
376
        $stmt->bindValue(':ip6', $ip6, PDO::PARAM_STR);
377
        $stmt->bindValue(':connected_at', $connectedAt, PDO::PARAM_INT);
378
379
        $stmt->execute();
380
381
        return 1 === $stmt->rowCount();
382
    }
383
384
    public function clientDisconnect($profileId, $commonName, $ip4, $ip6, $connectedAt, $disconnectedAt, $bytesTransferred)
385
    {