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

app/Repositories/Daemon/CommandRepository.php 1 location

@@ 48-68 (lines=21) @@
45
     * @throws DisplayException
46
     * @throws RequestException
47
     */
48
    public function send($command)
49
    {
50
        // We don't use the user's specific daemon secret here since we
51
        // are assuming that a call to this function has been validated.
52
        // Additionally not all calls to this will be from a logged in user.
53
        // (e.g. task queue or API)
54
        try {
55
            $response = $this->server->node->guzzleClient([
56
                'X-Access-Token' => $this->server->daemonSecret,
57
                'X-Access-Server' => $this->server->uuid,
58
            ])->request('POST', '/server/command', ['json' => ['command' => $command]]);
59
60
            if ($response->getStatusCode() < 200 || $response->getStatusCode() >= 300) {
61
                throw new DisplayException('Command sending responded with a non-200 error code.');
62
            }
63
64
            return $response->getBody();
65
        } catch (\Exception $ex) {
66
            throw $ex;
67
        }
68
    }
69
}
70

app/Repositories/Daemon/PowerRepository.php 1 location

@@ 40-60 (lines=21) @@
37
        $this->server = ($server instanceof Models\Server) ? $server : Models\Server::findOrFail($server);
38
    }
39
40
    public function do($action)
41
    {
42
        // We don't use the user's specific daemon secret here since we
43
        // are assuming that a call to this function has been validated.
44
        // Additionally not all calls to this will be from a logged in user.
45
        // (e.g. task queue or API)
46
        try {
47
            $response = $this->server->node->guzzleClient([
48
                'X-Access-Token' => $this->server->daemonSecret,
49
                'X-Access-Server' => $this->server->uuid,
50
            ])->request('PUT', '/server/power', ['json' => ['action' => $action]]);
51
52
            if ($response->getStatusCode() < 200 || $response->getStatusCode() >= 300) {
53
                throw new DisplayException('Power status responded with a non-200 error code.');
54
            }
55
56
            return $response->getBody();
57
        } catch (\Exception $ex) {
58
            throw $ex;
59
        }
60
    }
61
62
    public function start()
63
    {