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

src/Api/LogModule.php 1 location

@@ 30-45 (lines=16) @@
27
        $this->storage = $storage;
28
    }
29
30
    public function init(Service $service)
31
    {
32
        $service->get(
33
            '/log',
34
            function (Request $request, array $hookData) {
35
                AuthUtils::requireUser($hookData, ['vpn-admin-portal']);
36
37
                $dateTime = InputValidation::dateTime($request->getQueryParameter('date_time'));
38
                $ipAddress = InputValidation::ipAddress($request->getQueryParameter('ip_address'));
39
40
                $logData = $this->storage->getLogEntry($dateTime, $ipAddress);
41
42
                return new ApiResponse('log', $logData);
43
            }
44
        );
45
    }
46
}
47

src/Api/SystemMessagesModule.php 1 location

@@ 45-57 (lines=13) @@
42
43
        $service->post(
44
            '/add_system_message',
45
            function (Request $request, array $hookData) {
46
                AuthUtils::requireUser($hookData, ['vpn-admin-portal']);
47
48
                $type = InputValidation::messageType($request->getPostParameter('message_type'));
49
50
                // we do NOT sanitize or verify message as *everything* is
51
                // allowed! It will never be used as-is for showing in the
52
                // browser, as the user portal will escape it before showing
53
                // and the apps MUST interprete it as "text/plain".
54
                $message = $request->getPostParameter('message_body');
55
56
                return new ApiResponse('add_system_message', $this->storage->addSystemMessage($type, $message));
57
            }
58
        );
59
60
        $service->post(