From fd77bc84d12728ae8e4b72012f82ab2137ad1ba2 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 2 Oct 2024 23:38:05 +0200 Subject: [PATCH] fix(command): Make method compatible with upstream class (backportable) Signed-off-by: Joas Schilling --- core/Command/Base.php | 2 +- lib/private/Console/TimestampFormatter.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/Command/Base.php b/core/Command/Base.php index 0af5981e942..b915ae2ae4a 100644 --- a/core/Command/Base.php +++ b/core/Command/Base.php @@ -149,7 +149,7 @@ class Base extends Command implements CompletionAwareInterface { $this->interrupted = true; } - public function run(InputInterface $input, OutputInterface $output) { + public function run(InputInterface $input, OutputInterface $output): int { // check if the php pcntl_signal functions are accessible $this->php_pcntl_signal = function_exists('pcntl_signal'); if ($this->php_pcntl_signal) { diff --git a/lib/private/Console/TimestampFormatter.php b/lib/private/Console/TimestampFormatter.php index da1b7ba48dd..0254bff2b32 100644 --- a/lib/private/Console/TimestampFormatter.php +++ b/lib/private/Console/TimestampFormatter.php @@ -41,7 +41,7 @@ class TimestampFormatter implements OutputFormatterInterface { * * @return bool true if the output will decorate messages, false otherwise */ - public function isDecorated() { + public function isDecorated(): bool { return $this->formatter->isDecorated(); } @@ -61,7 +61,7 @@ class TimestampFormatter implements OutputFormatterInterface { * @param string $name * @return bool */ - public function hasStyle($name) { + public function hasStyle($name): bool { return $this->formatter->hasStyle($name); } @@ -72,7 +72,7 @@ class TimestampFormatter implements OutputFormatterInterface { * @return OutputFormatterStyleInterface * @throws \InvalidArgumentException When style isn't defined */ - public function getStyle($name) { + public function getStyle($name): OutputFormatterStyleInterface { return $this->formatter->getStyle($name); } -- 2.39.5