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

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

@@ 54-63 (lines=10) @@
51
        )->join('services', 'services.id', '=', 'service_options.parent_service')->get();
52
53
        $array = [];
54
        foreach ($options as &$option) {
55
            if (! array_key_exists($option->p_service, $array)) {
56
                $array[$option->p_service] = [];
57
            }
58
59
            $array[$option->p_service] = array_merge($array[$option->p_service], [[
60
                'id' => $option->id,
61
                'name' => $option->name,
62
            ]]);
63
        }
64
65
        return $array;
66
    }

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

@@ 220-226 (lines=7) @@
217
        $ips = Models\Allocation::where('node', $request->input('node'))->whereNull('assigned_to')->get();
218
        $listing = [];
219
220
        foreach ($ips as &$ip) {
221
            if (array_key_exists($ip->ip, $listing)) {
222
                $listing[$ip->ip] = array_merge($listing[$ip->ip], [$ip->port]);
223
            } else {
224
                $listing[$ip->ip] = [$ip->port];
225
            }
226
        }
227
228
        return response()->json($listing);
229
    }