diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-06-27 12:53:10 +0300 |
---|---|---|
committer | Côme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com> | 2022-07-11 12:46:23 +0300 |
commit | 868d748dbfa51461b5ee7cc827be6f314ae0959d (patch) | |
tree | eb5f33d57e2185c47c8d344e6b45d57dd189b93d /core/Command | |
parent | 3d0117990749bebe5394ff664d62494ae9a6fa1e (diff) |
Code cleaning of Background/ListCommand
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Background/ListCommand.php | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/core/Command/Background/ListCommand.php b/core/Command/Background/ListCommand.php index a0bf611606f..0bbf01d76db 100644 --- a/core/Command/Background/ListCommand.php +++ b/core/Command/Background/ListCommand.php @@ -2,9 +2,9 @@ declare(strict_types=1); /** - * @copyright Copyright (c) 2021, Joas Schilling <coding@schilljs.com> + * @copyright Copyright (c) 2022, Côme Chilliet <come.chilliet@nextcloud.com> * - * @author Joas Schilling <coding@schilljs.com> + * @author Côme Chilliet <come.chilliet@nextcloud.com> * * @license GNU AGPL version 3 or any later version * @@ -26,26 +26,17 @@ declare(strict_types=1); namespace OC\Core\Command\Background; use OC\Core\Command\Base; -use OCP\BackgroundJob\IJob; use OCP\BackgroundJob\IJobList; -use OCP\ILogger; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class ListCommand extends Base { - /** @var IJobList */ - protected $jobList; - /** @var ILogger */ - protected $logger; + protected IJobList $jobList; - public function __construct(IJobList $jobList, - ILogger $logger) { + public function __construct(IJobList $jobList) { parent::__construct(); $this->jobList = $jobList; - $this->logger = $logger; } protected function configure(): void { @@ -83,7 +74,7 @@ class ListCommand extends Base { protected function formatJobs(array $jobs): array { return array_map( - fn($job) => [ + fn ($job) => [ 'id' => $job->getId(), 'class' => get_class($job), 'last_run' => $job->getLastRun(), |