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

@@ 543-557 (lines=15) @@
540
     * @param  int     $id
541
     * @return \Illuminate\Response\RedirectResponse
542
     */
543
    public function resetDatabasePassword(Request $request, $id)
544
    {
545
        $database = Models\Database::where('server_id', $id)->findOrFail($request->input('database'));
546
        $repo = new DatabaseRepository;
547
548
        try {
549
            $repo->password($database->id, str_random(20));
550
551
            return response('', 204);
552
        } catch (\Exception $ex) {
553
            Log::error($ex);
554
555
            return response()->json(['error' => 'A unhandled exception occurred while attempting to reset this password. This error has been logged.'], 503);
556
        }
557
    }
558
559
    /**
560
     * Deletes a database from a server.
@@ 565-579 (lines=15) @@
562
     * @param  int     $id
563
     * @return \Illuminate\Response\RedirectResponse
564
     */
565
    public function deleteDatabase(Request $request, $id, $database)
566
    {
567
        $database = Models\Database::where('server_id', $id)->findOrFail($database);
568
        $repo = new DatabaseRepository;
569
570
        try {
571
            $repo->drop($database->id);
572
573
            return response('', 204);
574
        } catch (\Exception $ex) {
575
            Log::error($ex);
576
577
            return response()->json(['error' => 'A unhandled exception occurred while attempting to drop this database. This error has been logged.'], 503);
578
        }
579
    }
580
}
581