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

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

@@ 459-479 (lines=21) @@
456
     * @param  int     $id
457
     * @return \Illuminate\Response\RedirectResponse
458
     */
459
    public function continueDeletion(Request $request, $id, $method)
460
    {
461
        $repo = new ServerRepository;
462
463
        try {
464
            $repo->delete($id, (isset($method) && $method === 'force'));
465
            Alert::success('Server was successfully deleted from the system.')->flash();
466
467
            return redirect()->route('admin.servers');
468
        } catch (DisplayException $ex) {
469
            Alert::danger($ex->getMessage())->flash();
470
        } catch (TransferException $ex) {
471
            Log::warning($ex);
472
            Alert::danger('A TransferException occurred while attempting to delete this server from the daemon, please ensure it is running. This error has been logged.')->flash();
473
        } catch (\Exception $ex) {
474
            Log::error($ex);
475
            Alert::danger('An unhandled exception occured while attemping to delete this server. This error has been logged.')->flash();
476
        }
477
478
        return redirect()->route('admin.servers.view.delete', $id);
479
    }
480
481
    /**
482
     * Update the startup command as well as variables.
@@ 488-507 (lines=20) @@
485
     * @param  int     $id
486
     * @return \Illuminate\Response\RedirectResponse
487
     */
488
    public function saveStartup(Request $request, $id)
489
    {
490
        $repo = new ServerRepository;
491
492
        try {
493
            $repo->updateStartup($id, $request->except('_token'), true);
494
495
            Alert::success('Startup variables were successfully modified and assigned for this server.')->flash();
496
        } catch (DisplayException $ex) {
497
            Alert::danger($ex->getMessage())->flash();
498
        } catch (TransferException $ex) {
499
            Log::warning($ex);
500
            Alert::danger('A TransferException occurred while attempting to update the startup for this server, please ensure the daemon is running. This error has been logged.')->flash();
501
        } catch (\Exception $ex) {
502
            Log::error($ex);
503
            Alert::danger('An unhandled exception occured while attemping to update startup variables for this server. This error has been logged.')->flash();
504
        }
505
506
        return redirect()->route('admin.servers.view.startup', $id);
507
    }
508
509
    /**
510
     * Creates a new database assigned to a specific server.