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

src/Downloader.php 1 location

@@ 99-111 (lines=13) @@
96
97
        $fullCertificateChain = array_merge([$peerCertificate], $peerCertificateChain);
98
99
        $certificates = array_map(function ($certificate) use ($remoteAddress) {
100
            $certificateFields = openssl_x509_parse($certificate);
101
102
            $fingerprint = openssl_x509_fingerprint($certificate);
103
            $fingerprintSha256 = openssl_x509_fingerprint($certificate, 'sha256');
104
105
            return new SslCertificate(
106
                $certificateFields,
107
                $fingerprint,
108
                $fingerprintSha256,
109
                $remoteAddress
110
            );
111
        }, $fullCertificateChain);
112
113
        return array_unique($certificates);
114
    }

src/SslCertificate.php 1 location

@@ 39-51 (lines=13) @@
36
        return $this->createFromString(file_get_contents($pathToCertificate));
37
    }
38
39
    public static function createFromString(string $certificatePem): self
40
    {
41
        $certificateFields = openssl_x509_parse($certificatePem);
42
43
        $fingerprint = openssl_x509_fingerprint($certificatePem);
44
        $fingerprintSha256 = openssl_x509_fingerprint($certificatePem, 'sha256');
45
46
        return new self(
47
            $certificateFields,
48
            $fingerprint,
49
            $fingerprintSha256
50
        );
51
    }
52
53
    public function __construct(
54
        array $rawCertificateFields,