Code Duplication    Length = 9-9 lines in 2 locations

src/eXpansion/Framework/Core/Command/UpdateCommand.php 2 locations

@@ 67-75 (lines=9) @@
64
        $this->notifyPlayer("", "Updating Composer!", $playerLogin, $sfs);
65
        $process = $this->runCommand("composer self-update", $playerLogin, $sfs);
66
67
        if ($process->isSuccessful()) {
68
            $this->notifyPlayer("", "Composer has been updated", $playerLogin);
69
            $sfs->success('Composer has been updated');
70
        } else {
71
            $this->notifyPlayer("", "Composer update has failed", $playerLogin);
72
            $sfs->success('Composer update has failed');
73
74
            return 1;
75
        }
76
77
        $sfs->title("Updating eXpansion!");
78
        $this->notifyPlayer("", "Updating eXpansion!", $playerLogin, $sfs);
@@ 81-89 (lines=9) @@
78
        $this->notifyPlayer("", "Updating eXpansion!", $playerLogin, $sfs);
79
        $this->runCommand("composer update --prefer-dist --prefer-stable --no-suggest -o", $playerLogin, $sfs);
80
81
        if ($process->isSuccessful()) {
82
            $this->notifyPlayer("", "eXpansion has been updated. Please restart eXpansion", $playerLogin);
83
            $sfs->success('eXpansion has been updated');
84
        } else {
85
            $this->notifyPlayer("", "eXpansion update has failed", $playerLogin);
86
            $sfs->success('eXpansion update has failed');
87
88
            return 1;
89
        }
90
    }
91
92
    protected function runCommand($command, $playerLogin, SymfonyStyle $sfs)