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

src/Storage.php 2 locations

@@ 193-210 (lines=18) @@
190
        return $stmt->fetchColumn();
191
    }
192
193
    public function setTotpSecret($externalUserId, $totpSecret)
194
    {
195
        $userId = $this->getUserId($externalUserId);
196
        $stmt = $this->db->prepare(
197
            'INSERT INTO totp_secrets (user_id, totp_secret) VALUES(:user_id, :totp_secret)'
198
        );
199
        $stmt->bindValue(':user_id', $userId, PDO::PARAM_STR);
200
        $stmt->bindValue(':totp_secret', $totpSecret, PDO::PARAM_STR);
201
202
        try {
203
            $stmt->execute();
204
        } catch (PDOException $e) {
205
            // unable to add the TOTP secret, probably uniqueness contrains
206
            return false;
207
        }
208
209
        return true;
210
    }
211
212
    public function deleteTotpSecret($externalUserId)
213
    {
@@ 452-480 (lines=29) @@
449
        return $stmt->fetchAll(PDO::FETCH_ASSOC);
450
    }
451
452
    public function recordTotpKey($externalUserId, $totpKey, $timeUnix)
453
    {
454
        $userId = $this->getUserId($externalUserId);
455
        $stmt = $this->db->prepare(
456
            'INSERT INTO totp_log (
457
                user_id,
458
                totp_key,
459
                time_unix
460
             ) 
461
             VALUES(
462
                :user_id, 
463
                :totp_key,
464
                :time_unix
465
             )'
466
        );
467
468
        $stmt->bindValue(':user_id', $userId, PDO::PARAM_STR);
469
        $stmt->bindValue(':totp_key', $totpKey, PDO::PARAM_STR);
470
        $stmt->bindValue(':time_unix', $timeUnix, PDO::PARAM_INT);
471
472
        try {
473
            $stmt->execute();
474
        } catch (PDOException $e) {
475
            // unable to record the TOTP, probably uniqueness contrains
476
            return false;
477
        }
478
479
        return true;
480
    }
481
482
    public function cleanConnectionLog($timeUnix)
483
    {