]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(command): Make method compatible with upstream class (backportable)
authorJoas Schilling <coding@schilljs.com>
Wed, 2 Oct 2024 21:38:05 +0000 (23:38 +0200)
committerJoas Schilling <coding@schilljs.com>
Mon, 7 Oct 2024 10:11:25 +0000 (12:11 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
core/Command/Base.php
lib/private/Console/TimestampFormatter.php

index 0af5981e9422eb107794045aeec13b59d249d878..b915ae2ae4a3a80523f25cdbbd1afb8cb6860941 100644 (file)
@@ -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) {
index da1b7ba48dd57054cc09928967225bf0a6056053..0254bff2b324671a728ef85cf73e8c0ebf6d0d65 100644 (file)
@@ -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);
        }