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 = 21-21 lines in 3 locations

app/Http/Controllers/API/Admin/NodeController.php 1 location

@@ 153-173 (lines=21) @@
150
     * @param  int                       $id
151
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
152
     */
153
    public function delete(Request $request, $id)
154
    {
155
        $this->authorize('node-delete', $request->apiKey());
156
157
        $repo = new NodeRepository;
158
        try {
159
            $repo->delete($id);
160
161
            return response('', 204);
162
        } catch (DisplayException $ex) {
163
            return response()->json([
164
                'error' => $ex->getMessage(),
165
            ], 400);
166
        } catch (\Exception $ex) {
167
            Log::error($ex);
168
169
            return response()->json([
170
                'error' => 'An unhandled exception occured while attemping to delete this node. Please try again.',
171
            ], 500);
172
        }
173
    }
174
}
175

app/Http/Controllers/API/Admin/ServerController.php 1 location

@@ 252-272 (lines=21) @@
249
     * @param  int                       $id
250
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
251
     */
252
    public function install(Request $request, $id)
253
    {
254
        $this->authorize('server-install', $request->apiKey());
255
256
        $repo = new ServerRepository;
257
        try {
258
            $repo->toggleInstall($id);
259
260
            return response('', 204);
261
        } catch (DisplayException $ex) {
262
            return response()->json([
263
                'error' => $ex->getMessage(),
264
            ], 400);
265
        } catch (\Exception $ex) {
266
            Log::error($ex);
267
268
            return response()->json([
269
                'error' => 'An unhandled exception occured while attemping to toggle the install status for this server. Please try again.',
270
            ], 500);
271
        }
272
    }
273
274
    /**
275
     * Setup a server to have a container rebuild.

app/Http/Controllers/API/Admin/UserController.php 1 location

@@ 164-184 (lines=21) @@
161
     * @param  int                       $id
162
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
163
     */
164
    public function delete(Request $request, $id)
165
    {
166
        $this->authorize('user-delete', $request->apiKey());
167
168
        $repo = new UserRepository;
169
        try {
170
            $repo->delete($id);
171
172
            return response('', 204);
173
        } catch (DisplayException $ex) {
174
            return response()->json([
175
                'error' => $ex->getMessage(),
176
            ], 400);
177
        } catch (\Exception $ex) {
178
            Log::error($ex);
179
180
            return response()->json([
181
                'error' => 'An unhandled exception occured while attemping to delete this user. Please try again.',
182
            ], 500);
183
        }
184
    }
185
}
186