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

app/Http/Controllers/Daemon/PackController.php 2 locations

@@ 41-54 (lines=14) @@
38
     * @param  string                    $uuid
39
     * @return \Illuminate\Http\JsonResponse|\Symfony\Component\HttpFoundation\BinaryFileResponse
40
     */
41
    public function pull(Request $request, $uuid)
42
    {
43
        $pack = Models\Pack::where('uuid', $uuid)->first();
44
45
        if (! $pack) {
46
            return response()->json(['error' => 'No such pack.'], 404);
47
        }
48
49
        if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) {
50
            return response()->json(['error' => 'There is no archive available for this pack.'], 503);
51
        }
52
53
        return response()->download(storage_path('app/packs/' . $pack->uuid . '/archive.tar.gz'));
54
    }
55
56
    /**
57
     * Returns the hash information for a pack.
@@ 63-78 (lines=16) @@
60
     * @param  string                    $uuid
61
     * @return \Illuminate\Http\JsonResponse
62
     */
63
    public function hash(Request $request, $uuid)
64
    {
65
        $pack = Models\Pack::where('uuid', $uuid)->first();
66
67
        if (! $pack) {
68
            return response()->json(['error' => 'No such pack.'], 404);
69
        }
70
71
        if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) {
72
            return response()->json(['error' => 'There is no archive available for this pack.'], 503);
73
        }
74
75
        return response()->json([
76
            'archive.tar.gz' => sha1_file(storage_path('app/packs/' . $pack->uuid . '/archive.tar.gz')),
77
        ]);
78
    }
79
80
    /**
81
     * Pulls an update pack archive from the system.