3434 * @package OC\Migration
3535 */
3636class ConsoleOutput implements IOutput {
37- /** @var OutputInterface */
38- private $ output ;
37+ private ?ProgressBar $ progressBar = null ;
3938
40- /** @var ProgressBar */
41- private $ progressBar ;
42-
43- public function __construct (OutputInterface $ output ) {
44- $ this ->output = $ output ;
39+ public function __construct (
40+ private OutputInterface $ output ,
41+ ) {
4542 }
4643
4744 /**
4845 * @param string $message
4946 */
50- public function info ($ message ) {
47+ public function info ($ message ): void {
5148 $ this ->output ->writeln ("<info> $ message</info> " );
5249 }
5350
5451 /**
5552 * @param string $message
5653 */
57- public function warning ($ message ) {
54+ public function warning ($ message ): void {
5855 $ this ->output ->writeln ("<comment> $ message</comment> " );
5956 }
6057
6158 /**
6259 * @param int $max
6360 */
64- public function startProgress ($ max = 0 ) {
61+ public function startProgress ($ max = 0 ): void {
6562 if (!is_null ($ this ->progressBar )) {
6663 $ this ->progressBar ->finish ();
6764 }
@@ -73,7 +70,7 @@ public function startProgress($max = 0) {
7370 * @param int $step
7471 * @param string $description
7572 */
76- public function advance ($ step = 1 , $ description = '' ) {
73+ public function advance ($ step = 1 , $ description = '' ): void {
7774 if (is_null ($ this ->progressBar )) {
7875 $ this ->progressBar = new ProgressBar ($ this ->output );
7976 $ this ->progressBar ->start ();
@@ -84,7 +81,7 @@ public function advance($step = 1, $description = '') {
8481 }
8582 }
8683
87- public function finishProgress () {
84+ public function finishProgress (): void {
8885 if (is_null ($ this ->progressBar )) {
8986 return ;
9087 }
0 commit comments