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

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