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

app/Repositories/ServerRepository.php 1 location

@@ 752-770 (lines=19) @@
749
        }
750
    }
751
752
    public function deleteServer($id, $force)
753
    {
754
        $server = Models\Server::findOrFail($id);
755
        DB::beginTransaction();
756
757
        try {
758
            if ($force === 'force' || $force) {
759
                $server->installed = 3;
760
                $server->save();
761
            }
762
763
            $server->delete();
764
765
            return DB::commit();
766
        } catch (\Exception $ex) {
767
            DB::rollBack();
768
            throw $ex;
769
        }
770
    }
771
772
    public function deleteNow($id, $force = false)
773
    {

app/Repositories/ServiceRepository/Variable.php 1 location

@@ 77-93 (lines=17) @@
74
        return $variable;
75
    }
76
77
    public function delete($id)
78
    {
79
        $variable = Models\ServiceVariable::with('serverVariable')->findOrFail($id);
80
81
        DB::beginTransaction();
82
        try {
83
            foreach ($variable->serverVariable as $svar) {
84
                $svar->delete();
85
            }
86
            $variable->delete();
87
88
            DB::commit();
89
        } catch (\Exception $ex) {
90
            DB::rollBack();
91
            throw $ex;
92
        }
93
    }
94
95
    public function update($id, array $data)
96
    {