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

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

@@ 561-575 (lines=15) @@
558
     * @param  int                       $id
559
     * @return \Illuminate\Http\RedirectResponse
560
     */
561
    public function resetDatabasePassword(Request $request, $id)
562
    {
563
        $database = Models\Database::where('server_id', $id)->findOrFail($request->input('database'));
564
        $repo = new DatabaseRepository;
565
566
        try {
567
            $repo->password($database->id, str_random(20));
568
569
            return response('', 204);
570
        } catch (\Exception $ex) {
571
            Log::error($ex);
572
573
            return response()->json(['error' => 'A unhandled exception occurred while attempting to reset this password. This error has been logged.'], 503);
574
        }
575
    }
576
577
    /**
578
     * Deletes a database from a server.
@@ 585-599 (lines=15) @@
582
     * @param  int                       $database
583
     * @return \Illuminate\Http\RedirectResponse
584
     */
585
    public function deleteDatabase(Request $request, $id, $database)
586
    {
587
        $database = Models\Database::where('server_id', $id)->findOrFail($database);
588
        $repo = new DatabaseRepository;
589
590
        try {
591
            $repo->drop($database->id);
592
593
            return response('', 204);
594
        } catch (\Exception $ex) {
595
            Log::error($ex);
596
597
            return response()->json(['error' => 'A unhandled exception occurred while attempting to drop this database. This error has been logged.'], 503);
598
        }
599
    }
600
}
601