MontealegreLuis /
phuml
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * PHP version 7.1 |
||
| 4 | * |
||
| 5 | * This source file is subject to the license that is bundled with this package in the file LICENSE. |
||
| 6 | */ |
||
| 7 | |||
| 8 | namespace PhUml\Console; |
||
| 9 | |||
| 10 | use Exception; |
||
| 11 | use Symfony\Component\Console\Output\OutputInterface; |
||
|
0 ignored issues
–
show
|
|||
| 12 | |||
| 13 | class UpdaterDisplay |
||
| 14 | { |
||
| 15 | /** @var OutputInterface */ |
||
| 16 | private $output; |
||
| 17 | |||
| 18 | public function __construct(OutputInterface $output) |
||
| 19 | 27 | { |
|
| 20 | $this->output = $output; |
||
| 21 | 27 | } |
|
| 22 | 27 | ||
| 23 | public function rollbackMessage(bool $result): void |
||
| 24 | 6 | { |
|
| 25 | if ($result) { |
||
| 26 | 6 | $this->output->writeln('<info>phUML has been rolled back to prior version.</info>'); |
|
| 27 | 3 | } else { |
|
| 28 | $this->output->writeln('<error>Rollback failed for unknown reasons.</error>'); |
||
| 29 | 3 | } |
|
| 30 | } |
||
| 31 | 6 | ||
| 32 | public function currentLocalVersion(string $version): void |
||
| 33 | 3 | { |
|
| 34 | $this->output->writeln(sprintf( |
||
| 35 | 3 | 'Your current local build version is: <options=bold>%s</options=bold>', |
|
| 36 | 3 | $version |
|
| 37 | 3 | )); |
|
| 38 | } |
||
| 39 | 3 | ||
| 40 | public function newVersion(string $newVersion): void |
||
| 41 | 3 | { |
|
| 42 | $this->output->writeln(sprintf( |
||
| 43 | 3 | 'The current stable build available remotely is: <options=bold>%s</options=bold>', |
|
| 44 | 3 | $newVersion |
|
| 45 | 3 | )); |
|
| 46 | } |
||
| 47 | 3 | ||
| 48 | public function noUpdatesAvailable(): void |
||
| 49 | 3 | { |
|
| 50 | $this->output->writeln('There are no stable builds available.'); |
||
| 51 | 3 | } |
|
| 52 | 3 | ||
| 53 | public function alreadyUpToDate(): void |
||
| 54 | 3 | { |
|
| 55 | $this->output->writeln('You have the current stable build installed.'); |
||
| 56 | 3 | } |
|
| 57 | 3 | ||
| 58 | public function updateApplied(string $oldVersion, string $newVersion): void |
||
| 59 | 3 | { |
|
| 60 | $this->output->writeln('<info>phUML has been updated.</info>'); |
||
| 61 | 3 | $this->output->writeln(sprintf( |
|
| 62 | 3 | '<info>Current version is:</info> <options=bold>%s</options=bold>.', |
|
| 63 | 3 | $newVersion |
|
| 64 | 3 | )); |
|
| 65 | $this->output->writeln(sprintf( |
||
| 66 | 3 | '<info>Previous version was:</info> <options=bold>%s</options=bold>.', |
|
| 67 | 3 | $oldVersion |
|
| 68 | 3 | )); |
|
| 69 | } |
||
| 70 | 3 | ||
| 71 | public function noUpdateApplied(string $currentVersion): void |
||
| 72 | 3 | { |
|
| 73 | $this->output->writeln('<info>phUML is currently up to date.</info>'); |
||
| 74 | 3 | $this->output->writeln(sprintf( |
|
| 75 | 3 | '<info>Current version is:</info> <options=bold>%s</options=bold>.', |
|
| 76 | 3 | $currentVersion |
|
| 77 | 3 | )); |
|
| 78 | } |
||
| 79 | 3 | ||
| 80 | public function error(Exception $exception): void |
||
| 81 | 3 | { |
|
| 82 | $this->output->writeln(sprintf('Error: <comment>%s</comment>', $exception->getMessage())); |
||
| 83 | 3 | } |
|
| 84 | } |
||
| 85 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths