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

app/Http/Controllers/Admin/ServersController.php 2 locations

@@ 91-108 (lines=18) @@
88
     * @param  Request $request
89
     * @return \Illuminate\Response\RedirectResponse
90
     */
91
    public function create(Request $request)
92
    {
93
        try {
94
            $repo = new ServerRepository;
95
            $server = $repo->create($request->except('_token'));
96
97
            return redirect()->route('admin.servers.view', $server->id);
98
        } catch (DisplayValidationException $ex) {
99
            return redirect()->route('admin.servers.new')->withErrors(json_decode($ex->getMessage()))->withInput();
100
        } catch (DisplayException $ex) {
101
            Alert::danger($ex->getMessage())->flash();
102
        } catch (\Exception $ex) {
103
            Log::error($ex);
104
            Alert::danger('An unhandled exception occured while attemping to add this server. Please try again.')->flash();
105
        }
106
107
        return redirect()->route('admin.servers.new')->withInput();
108
    }
109
110
    /**
111
     * Returns a tree of all avaliable nodes in a given location.
@@ 279-297 (lines=19) @@
276
     * @param  int     $id
277
     * @return \Illuminate\Response\RedirectResponse
278
     */
279
    public function setContainer(Request $request, $id)
280
    {
281
        $repo = new ServerRepository;
282
283
        try {
284
            $repo->updateContainer($id, $request->intersect('docker_image'));
285
286
            Alert::success('Successfully updated this server\'s docker image.')->flash();
287
        } catch (DisplayValidationException $ex) {
288
            return redirect()->route('admin.servers.view.details', $id)->withErrors(json_decode($ex->getMessage()))->withInput();
289
        } catch (DisplayException $ex) {
290
            Alert::danger($ex->getMessage())->flash();
291
        } catch (\Exception $ex) {
292
            Log::error($ex);
293
            Alert::danger('An unhandled exception occured while attemping to update this server\'s docker image. This error has been logged.')->flash();
294
        }
295
296
        return redirect()->route('admin.servers.view.details', $id);
297
    }
298
299
    /**
300
     * Toggles the install status for a server.