Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | protected function execute(InputInterface $input, OutputInterface $output) |
||
23 | { |
||
24 | $updater = new Updater(); |
||
25 | $updater->getStrategy()->setPharUrl(sprintf('%s/releaser.phar', self::DISTRIBUTION_PREFIX)); |
||
26 | $updater->getStrategy()->setVersionUrl(sprintf('%s/releaser.phar.version', self::DISTRIBUTION_PREFIX)); |
||
27 | |||
28 | $result = $updater->update(); |
||
29 | if (!$result) { |
||
30 | $output->writeln('You are already using the latest version!'); |
||
31 | return; |
||
32 | } |
||
33 | $new = $updater->getNewVersion(); |
||
34 | $old = $updater->getOldVersion(); |
||
35 | $output->writeln(sprintf('Updated from %s to %s', $old, $new)); |
||
36 | } |
||
37 | } |
||
38 |