diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2023-11-07 20:47:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-07 20:47:39 +0100 |
commit | 2e24e70d941efbc0ba3a0aeadca404aa25a3afb5 (patch) | |
tree | 9defd11dd7baa7d3f3dbbc4a9eace66336e43707 /lib/private/Migration/ConsoleOutput.php | |
parent | 2769b99bcf95391e6c3cd8d678bdffb92c5bc017 (diff) | |
parent | cbc47a98905906d7fbd9b78f8fc71de38a2a2f41 (diff) | |
download | nextcloud-server-2e24e70d941efbc0ba3a0aeadca404aa25a3afb5.tar.gz nextcloud-server-2e24e70d941efbc0ba3a0aeadca404aa25a3afb5.zip |
Merge pull request #39109 from fsamapoor/refactor_lib_private_metadata_migration_net
Refactors /Metadata, /Migration, and /Net namespaces in /lib/private/
Diffstat (limited to 'lib/private/Migration/ConsoleOutput.php')
-rw-r--r-- | lib/private/Migration/ConsoleOutput.php | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/private/Migration/ConsoleOutput.php b/lib/private/Migration/ConsoleOutput.php index 00b79f34866..841e3d302fc 100644 --- a/lib/private/Migration/ConsoleOutput.php +++ b/lib/private/Migration/ConsoleOutput.php @@ -34,14 +34,11 @@ use Symfony\Component\Console\Output\OutputInterface; * @package OC\Migration */ class ConsoleOutput implements IOutput { - /** @var OutputInterface */ - private $output; + private ?ProgressBar $progressBar = null; - /** @var ProgressBar */ - private $progressBar; - - public function __construct(OutputInterface $output) { - $this->output = $output; + public function __construct( + private OutputInterface $output, + ) { } public function debug(string $message): void { @@ -51,21 +48,21 @@ class ConsoleOutput implements IOutput { /** * @param string $message */ - public function info($message) { + public function info($message): void { $this->output->writeln("<info>$message</info>"); } /** * @param string $message */ - public function warning($message) { + public function warning($message): void { $this->output->writeln("<comment>$message</comment>"); } /** * @param int $max */ - public function startProgress($max = 0) { + public function startProgress($max = 0): void { if (!is_null($this->progressBar)) { $this->progressBar->finish(); } @@ -77,7 +74,7 @@ class ConsoleOutput implements IOutput { * @param int $step * @param string $description */ - public function advance($step = 1, $description = '') { + public function advance($step = 1, $description = ''): void { if (is_null($this->progressBar)) { $this->progressBar = new ProgressBar($this->output); $this->progressBar->start(); @@ -88,7 +85,7 @@ class ConsoleOutput implements IOutput { } } - public function finishProgress() { + public function finishProgress(): void { if (is_null($this->progressBar)) { return; } |