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 2 locations

src/NotificationHubsRest/NotificationHub/NotificationHub.php 2 locations

@@ 74-91 (lines=18) @@
71
     *
72
     * @return mixed
73
     */
74
    public function createRegistration(RegistrationInterface $registration)
75
    {
76
        if ($registration->getRegistrationId() || $registration->getETag()) {
77
            throw new \RuntimeException('Registration ID and ETag must be empty.');
78
        }
79
80
        $uri = $registration->buildUri($this->endpoint, $this->hubPath).self::API_VERSION;
81
82
        $token = $this->generateSasToken($uri);
83
        $headers = array_merge(['Authorization: '.$token], $registration->getHeaders());
84
85
        $response = $this->request(self::METHOD_POST, $uri, $headers, $registration->getPayload());
86
87
        return $registration->scrapeResponse($response);
88
    }
89
90
    /**
91
     * Create or Update Registration.
92
     *
93
     * @param RegistrationInterface $registration
94
     *
@@ 99-113 (lines=15) @@
96
     *
97
     * @return mixed
98
     */
99
    public function updateRegistration(RegistrationInterface $registration)
100
    {
101
        if (!$registration->getRegistrationId()) {
102
            throw new \RuntimeException('Registration ID is mandatory.');
103
        }
104
105
        $uri = $registration->buildUri($this->endpoint, $this->hubPath).self::API_VERSION;
106
107
        $token = $this->generateSasToken($uri);
108
        $headers = array_merge(['Authorization: '.$token], $registration->getHeaders());
109
110
        $response = $this->request(self::METHOD_PUT, $uri, $headers, $registration->getPayload());
111
112
        return $registration->scrapeResponse($response);
113
    }
114
115
    /**
116
     * Delete Registration.