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 = 22-23 lines in 2 locations

app/Http/Controllers/Admin/OptionController.php 1 location

@@ 93-114 (lines=22) @@
90
     * @param  int                       $id
91
     * @return \Illuminate\Http\RedirectResponse
92
     */
93
    public function createVariable(Request $request, $id)
94
    {
95
        $repo = new VariableRepository;
96
97
        try {
98
            $variable = $repo->create($id, $request->only([
99
                'name', 'description', 'env_variable',
100
                'default_value', 'options', 'rules',
101
            ]));
102
103
            Alert::success('New variable successfully assigned to this service option.')->flash();
104
        } catch (DisplayValidationException $ex) {
105
            return redirect()->route('admin.services.option.variables', $id)->withErrors(json_decode($ex->getMessage()));
106
        } catch (DisplayException $ex) {
107
            Alert::danger($ex->getMessage())->flash();
108
        } catch (\Exception $ex) {
109
            Log::error($ex);
110
            Alert::danger('An unhandled exception was encountered while attempting to process that request. This error has been logged.')->flash();
111
        }
112
113
        return redirect()->route('admin.services.option.variables', $id);
114
    }
115
116
    /**
117
     * Display option overview page.

app/Http/Controllers/Admin/DatabaseController.php 1 location

@@ 75-97 (lines=23) @@
72
     * @param  \Illuminate\Http\Request  $request
73
     * @return \Illuminate\Http\RedirectResponse
74
     */
75
    public function create(Request $request)
76
    {
77
        $repo = new DatabaseRepository;
78
79
        try {
80
            $host = $repo->add($request->intersect([
81
                'name', 'username', 'password',
82
                'host', 'port', 'node_id',
83
            ]));
84
            Alert::success('Successfully created new database host on the system.')->flash();
85
86
            return redirect()->route('admin.databases.view', $host->id);
87
        } catch (\PDOException $ex) {
88
            Alert::danger($ex->getMessage())->flash();
89
        } catch (DisplayValidationException $ex) {
90
            return redirect()->route('admin.databases')->withErrors(json_decode($ex->getMessage()));
91
        } catch (\Exception $ex) {
92
            Log::error($ex);
93
            Alert::danger('An error was encountered while trying to process this request. This error has been logged.')->flash();
94
        }
95
96
        return redirect()->route('admin.databases');
97
    }
98
99
    /**
100
     * Handle post request to update a database host.