Code Duplication    Length = 6-7 lines in 2 locations

src/Command/CommandSelfUpdate.php 1 location

@@ 64-70 (lines=7) @@
61
        try {
62
            $output->writeln('Checks for updates...');
63
            $result = $this->updater->update();
64
            if ($result) {
65
                $new = $this->updater->getNewVersion();
66
                $old = $this->updater->getOldVersion();
67
                $output->writeln(sprintf('Updated from %s to %s.', $old, $new));
68
69
                return 0;
70
            }
71
            $output->writeln(sprintf('You are already using last version (%s).', $this->version));
72
73
            return 0;

src/Command/SelfUpdate.php 1 location

@@ 53-58 (lines=6) @@
50
        try {
51
            echo "\rChecks for updates...";
52
            $result = $this->updater->update();
53
            if ($result) {
54
                $new = $this->updater->getNewVersion();
55
                $old = $this->updater->getOldVersion();
56
                printf("\rUpdated from %s to %s.\n", $old, $new);
57
                exit(0);
58
            }
59
            printf("\rYou are already using last version (%s).\n", $this->version);
60
            exit(0);
61
        } catch (\Exception $e) {