diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-02-23 21:44:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 21:44:18 +0100 |
commit | 7cf3172f1ced2d1d8d376140e0268a860d228b0b (patch) | |
tree | 00bf0c5ba0cedb39efb9f7bb8d8633932ea5759b /core/Command | |
parent | 09b1f049bda78f7f3985aad5259d6d17d204c11f (diff) | |
parent | 706231438eed9e8261133df4b772a86d480dcfa0 (diff) | |
download | nextcloud-server-7cf3172f1ced2d1d8d376140e0268a860d228b0b.tar.gz nextcloud-server-7cf3172f1ced2d1d8d376140e0268a860d228b0b.zip |
Merge pull request #39184 from shdehnavi/refactor_core_command_background
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Background/Ajax.php | 2 | ||||
-rw-r--r-- | core/Command/Background/Base.php | 3 | ||||
-rw-r--r-- | core/Command/Background/Cron.php | 2 | ||||
-rw-r--r-- | core/Command/Background/Job.php | 2 | ||||
-rw-r--r-- | core/Command/Background/WebCron.php | 2 |
5 files changed, 6 insertions, 5 deletions
diff --git a/core/Command/Background/Ajax.php b/core/Command/Background/Ajax.php index 5dc94d939d7..41b80eb531f 100644 --- a/core/Command/Background/Ajax.php +++ b/core/Command/Background/Ajax.php @@ -26,7 +26,7 @@ namespace OC\Core\Command\Background; class Ajax extends Base { - protected function getMode() { + protected function getMode(): string { return 'ajax'; } } diff --git a/core/Command/Background/Base.php b/core/Command/Background/Base.php index 5b2da21af75..715596f9979 100644 --- a/core/Command/Background/Base.php +++ b/core/Command/Background/Base.php @@ -45,7 +45,7 @@ abstract class Base extends Command { parent::__construct(); } - protected function configure() { + protected function configure(): void { $mode = $this->getMode(); $this ->setName("background:$mode") @@ -59,6 +59,7 @@ abstract class Base extends Command { * * @param InputInterface $input * @param OutputInterface $output + * @return int */ protected function execute(InputInterface $input, OutputInterface $output): int { $mode = $this->getMode(); diff --git a/core/Command/Background/Cron.php b/core/Command/Background/Cron.php index 9dbb4f855e5..665919b5ae9 100644 --- a/core/Command/Background/Cron.php +++ b/core/Command/Background/Cron.php @@ -26,7 +26,7 @@ namespace OC\Core\Command\Background; class Cron extends Base { - protected function getMode() { + protected function getMode(): string { return 'cron'; } } diff --git a/core/Command/Background/Job.php b/core/Command/Background/Job.php index fdfb7484b51..0c64a05e2a7 100644 --- a/core/Command/Background/Job.php +++ b/core/Command/Background/Job.php @@ -102,7 +102,7 @@ class Job extends Command { return 0; } - protected function printJobInfo(int $jobId, IJob $job, OutputInterface$output): void { + protected function printJobInfo(int $jobId, IJob $job, OutputInterface $output): void { $row = $this->jobList->getDetailsById($jobId); $lastRun = new \DateTime(); diff --git a/core/Command/Background/WebCron.php b/core/Command/Background/WebCron.php index 7da379b6a53..59bf4746c40 100644 --- a/core/Command/Background/WebCron.php +++ b/core/Command/Background/WebCron.php @@ -26,7 +26,7 @@ namespace OC\Core\Command\Background; class WebCron extends Base { - protected function getMode() { + protected function getMode(): string { return 'webcron'; } } |