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 = 15-18 lines in 5 locations

src/Storage.php 5 locations

@@ 72-87 (lines=16) @@
69
    /**
70
     * @return array|false
71
     */
72
    public function getUserCertificateInfo($commonName)
73
    {
74
        $stmt = $this->db->prepare(
75
<<< 'SQL'
76
    SELECT 
77
        u.user_id AS user_id, 
78
        u.is_disabled AS user_is_disabled,
79
        c.display_name AS display_name,
80
        c.is_disabled AS certificate_is_disabled 
81
    FROM 
82
        users u, certificates c 
83
    WHERE 
84
        u.user_id = c.user_id AND 
85
        c.common_name = :common_name
86
SQL
87
        );
88
89
        $stmt->bindValue(':common_name', $commonName, PDO::PARAM_STR);
90
        $stmt->execute();
@@ 693-707 (lines=15) @@
690
        return true;
691
    }
692
693
    public function cleanConnectionLog(DateTime $dateTime)
694
    {
695
        $stmt = $this->db->prepare(
696
<<< 'SQL'
697
    DELETE FROM
698
        connection_log
699
    WHERE
700
        connected_at < :date_time
701
    AND
702
        disconnected_at IS NOT NULL
703
SQL
704
        );
705
706
        $stmt->bindValue(':date_time', $dateTime->format('Y-m-d H:i:s'), PDO::PARAM_STR);
707
708
        return $stmt->execute();
709
    }
710
@@ 711-725 (lines=15) @@
708
        return $stmt->execute();
709
    }
710
711
    public function cleanUserMessages(DateTime $dateTime)
712
    {
713
        $stmt = $this->db->prepare(
714
<<< 'SQL'
715
    DELETE FROM
716
        user_messages
717
    WHERE
718
        date_time < :date_time
719
SQL
720
        );
721
722
        $stmt->bindValue(':date_time', $dateTime->format('Y-m-d H:i:s'), PDO::PARAM_STR);
723
724
        return $stmt->execute();
725
    }
726
727
    public function cleanTotpLog(DateTime $dateTime)
728
    {
@@ 727-741 (lines=15) @@
724
        return $stmt->execute();
725
    }
726
727
    public function cleanTotpLog(DateTime $dateTime)
728
    {
729
        $stmt = $this->db->prepare(
730
<<< 'SQL'
731
    DELETE FROM 
732
        totp_log
733
    WHERE 
734
        date_time < :date_time
735
SQL
736
        );
737
738
        $stmt->bindValue(':date_time', $dateTime->format('Y-m-d H:i:s'), PDO::PARAM_STR);
739
740
        return $stmt->execute();
741
    }
742
743
    /**
744
     * @return array
@@ 746-763 (lines=18) @@
743
    /**
744
     * @return array
745
     */
746
    public function systemMessages($type)
747
    {
748
        $stmt = $this->db->prepare(
749
<<< 'SQL'
750
    SELECT
751
        id, message, date_time 
752
    FROM 
753
        system_messages
754
    WHERE
755
        type = :type
756
SQL
757
        );
758
759
        $stmt->bindValue(':type', $type, PDO::PARAM_STR);
760
        $stmt->execute();
761
762
        return $stmt->fetchAll(PDO::FETCH_ASSOC);
763
    }
764
765
    public function addSystemMessage($type, $message)
766
    {