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

app/Http/Controllers/Server/ServerController.php 2 locations

@@ 322-341 (lines=20) @@
319
     * @param  string                    $uuid
320
     * @return \Illuminate\Http\RedirectResponse
321
     */
322
    public function postSettingsSFTP(Request $request, $uuid)
323
    {
324
        $server = Models\Server::byUuid($uuid);
325
        $this->authorize('reset-sftp', $server);
326
327
        try {
328
            $repo = new ServerRepository;
329
            $repo->updateSFTPPassword($server->id, $request->input('sftp_pass'));
330
            Alert::success('Successfully updated this servers SFTP password.')->flash();
331
        } catch (DisplayValidationException $ex) {
332
            return redirect()->route('server.settings.sftp', $uuid)->withErrors(json_decode($ex->getMessage()));
333
        } catch (DisplayException $ex) {
334
            Alert::danger($ex->getMessage())->flash();
335
        } catch (\Exception $ex) {
336
            Log::error($ex);
337
            Alert::danger('An unknown error occured while attempting to update this server\'s SFTP settings.')->flash();
338
        }
339
340
        return redirect()->route('server.settings.sftp', $uuid);
341
    }
342
343
    /**
344
     * Handles changing the startup settings for a server.
@@ 350-369 (lines=20) @@
347
     * @param  string                    $uuid
348
     * @return \Illuminate\Http\RedirectResponse
349
     */
350
    public function postSettingsStartup(Request $request, $uuid)
351
    {
352
        $server = Models\Server::byUuid($uuid);
353
        $this->authorize('edit-startup', $server);
354
355
        try {
356
            $repo = new ServerRepository;
357
            $repo->updateStartup($server->id, $request->except('_token'));
358
            Alert::success('Server startup variables were successfully updated.')->flash();
359
        } catch (DisplayValidationException $ex) {
360
            return redirect()->route('server.settings.startup', $uuid)->withErrors(json_decode($ex->getMessage()));
361
        } catch (DisplayException $ex) {
362
            Alert::danger($ex->getMessage())->flash();
363
        } catch (\Exception $ex) {
364
            Log::error($ex);
365
            Alert::danger('An unhandled exception occured while attemping to update startup variables for this server. Please try again.')->flash();
366
        }
367
368
        return redirect()->route('server.settings.startup', $uuid);
369
    }
370
}
371