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

src/Serialization/Compact.php 2 locations

@@ 48-64 (lines=17) @@
45
     * @return HeaderParameter\ParameterInterface[]
46
     * @throws \InvalidArgumentException
47
     */
48
    protected function parseHeaders($headersJson)
49
    {
50
        $parameters = [];
51
        $headers = json_decode($headersJson, true);
52
53
        if (!is_array($headers) || empty($headers)) {
54
            throw new \InvalidArgumentException('Not a valid header of JWT string passed for deserialization');
55
        }
56
57
        foreach ($headers as $name => $value) {
58
            $parameter = $this->headerParameterFactory->get($name);
59
            $parameter->setValue($value);
60
            $parameters[] = $parameter;
61
        }
62
63
        return  $parameters;
64
    }
65
66
    /**
67
     * @param string $payloadJson
@@ 72-88 (lines=17) @@
69
     * @return Claim\ClaimInterface[]
70
     * @throws \InvalidArgumentException
71
     */
72
    protected function parsePayload($payloadJson)
73
    {
74
        $claims = [];
75
        $payload = json_decode($payloadJson, true);
76
77
        if (!is_array($payload)) {
78
            throw new \InvalidArgumentException('Not a valid payload of JWT string passed for deserialization');
79
        }
80
81
        foreach ($payload as $name => $value) {
82
            $claim = $this->claimFactory->get($name);
83
            $claim->setValue($value);
84
            $claims[] = $claim;
85
        }
86
87
        return $claims;
88
    }
89
90
    /**
91
     * @param string $jwt