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/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
    {

app/Repositories/ServerRepository.php 1 location

@@ 691-709 (lines=19) @@
688
        });
689
    }
690
691
    public function queueDeletion($id, $force = false)
692
    {
693
        $server = Models\Server::findOrFail($id);
694
        DB::beginTransaction();
695
696
        try {
697
            if ($force) {
698
                $server->installed = 3;
699
                $server->save();
700
            }
701
702
            $server->delete();
703
704
            return DB::commit();
705
        } catch (\Exception $ex) {
706
            DB::rollBack();
707
            throw $ex;
708
        }
709
    }
710
711
    public function delete($id, $force = false)
712
    {