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

app/Http/Controllers/Admin/UserController.php 1 location

@@ 90-104 (lines=15) @@
87
     * @param  int                       $id
88
     * @return \Illuminate\Http\RedirectResponse
89
     */
90
    public function delete(Request $request, $id)
91
    {
92
        try {
93
            $repo = new UserRepository;
94
            $repo->delete($id);
95
            Alert::success('Successfully deleted user from system.')->flash();
96
97
            return redirect()->route('admin.users');
98
        } catch (DisplayException $ex) {
99
            Alert::danger($ex->getMessage())->flash();
100
        } catch (\Exception $ex) {
101
            Log::error($ex);
102
            Alert::danger('An exception was encountered while attempting to delete this user.')->flash();
103
        }
104
105
        return redirect()->route('admin.users.view', $id);
106
    }
107

app/Http/Controllers/Admin/NodesController.php 1 location

@@ 345-362 (lines=18) @@
342
     * @param  int                       $id
343
     * @return \Illuminate\Http\RedirectResponse
344
     */
345
    public function delete(Request $request, $id)
346
    {
347
        $repo = new NodeRepository;
348
349
        try {
350
            $repo->delete($id);
351
            Alert::success('Successfully deleted the requested node from the panel.')->flash();
352
353
            return redirect()->route('admin.nodes');
354
        } catch (DisplayException $ex) {
355
            Alert::danger($ex->getMessage())->flash();
356
        } catch (\Exception $ex) {
357
            Log::error($ex);
358
            Alert::danger('An unhandled exception occured while attempting to delete this node. Please try again.')->flash();
359
        }
360
361
        return redirect()->route('admin.nodes.view', $id);
362
    }
363
364
    /**
365
     * Returns the configuration token to auto-deploy a node.

app/Http/Controllers/Admin/ServersController.php 1 location

@@ 331-346 (lines=16) @@
328
     * @param  int                       $id
329
     * @return \Illuminate\Http\RedirectResponse
330
     */
331
    public function toggleInstall(Request $request, $id)
332
    {
333
        $repo = new ServerRepository;
334
        try {
335
            $repo->toggleInstall($id);
336
337
            Alert::success('Server install status was successfully toggled.')->flash();
338
        } catch (DisplayException $ex) {
339
            Alert::danger($ex->getMessage())->flash();
340
        } catch (\Exception $ex) {
341
            Log::error($ex);
342
            Alert::danger('An unhandled exception occured while attemping to toggle this servers status. This error has been logged.')->flash();
343
        }
344
345
        return redirect()->route('admin.servers.view.manage', $id);
346
    }
347
348
    /**
349
     * Reinstalls the server with the currently assigned pack and service.