Conditions | 3 |
Paths | 7 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function processCommand() |
||
43 | { |
||
44 | try { |
||
45 | echo "\rChecks for updates..."; |
||
46 | $result = $this->updater->update(); |
||
47 | if ($result) { |
||
48 | $new = $this->updater->getNewVersion(); |
||
49 | $old = $this->updater->getOldVersion(); |
||
50 | printf("\rUpdated from %s to %s.\n", $old, $new); |
||
51 | exit(0); |
||
52 | } |
||
53 | printf("\rYou are already using last version (%s).\n", $this->version); |
||
54 | exit(0); |
||
55 | } catch (\Exception $e) { |
||
56 | echo $e->getMessage(); |
||
57 | exit(1); |
||
58 | } |
||
59 | } |
||
60 | } |
||
61 |