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

@@ 237-252 (lines=16) @@
234
        return 1 === $stmt->rowCount();
235
    }
236
237
    public function addCertificate($externalUserId, $commonName, $displayName, $validFrom, $validTo)
238
    {
239
        $userId = $this->getInternalUserId($externalUserId);
240
        $stmt = $this->db->prepare(
241
            'INSERT INTO certificates (common_name, user_id, display_name, valid_from, valid_to) VALUES(:common_name, :user_id, :display_name, :valid_from, :valid_to)'
242
        );
243
        $stmt->bindValue(':common_name', $commonName, PDO::PARAM_STR);
244
        $stmt->bindValue(':user_id', $userId, PDO::PARAM_STR);
245
        $stmt->bindValue(':display_name', $displayName, PDO::PARAM_STR);
246
        $stmt->bindValue(':valid_from', $validFrom, PDO::PARAM_INT);
247
        $stmt->bindValue(':valid_to', $validTo, PDO::PARAM_INT);
248
249
        $stmt->execute();
250
251
        return 1 === $stmt->rowCount();
252
    }
253
254
    public function getCertificates($externalUserId)
255
    {
@@ 378-406 (lines=29) @@
375
        return $stmt->fetchAll(PDO::FETCH_ASSOC);
376
    }
377
378
    public function clientConnect($profileId, $commonName, $ip4, $ip6, $connectedAt)
379
    {
380
        $stmt = $this->db->prepare(
381
            'INSERT INTO connection_log (
382
                external_user_id,
383
                profile_id,
384
                common_name,
385
                ip4,
386
                ip6,
387
                connected_at
388
             ) 
389
             VALUES(
390
                (
391
                    SELECT
392
                        u.external_user_id
393
                    FROM 
394
                        users u, certificates c
395
                    WHERE
396
                        u.user_id = c.user_id
397
                    AND
398
                        c.common_name = :common_name
399
                ),                
400
                :profile_id, 
401
                :common_name,
402
                :ip4,
403
                :ip6,
404
                :connected_at
405
             )'
406
        );
407
408
        $stmt->bindValue(':profile_id', $profileId, PDO::PARAM_STR);
409
        $stmt->bindValue(':common_name', $commonName, PDO::PARAM_STR);