From 868d748dbfa51461b5ee7cc827be6f314ae0959d Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 27 Jun 2022 11:53:10 +0200 Subject: Code cleaning of Background/ListCommand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- core/Command/Background/ListCommand.php | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'core/Command') 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 + * @copyright Copyright (c) 2022, Côme Chilliet * - * @author Joas Schilling + * @author Côme Chilliet * * @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(), -- cgit v1.2.3