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

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