diff options
Diffstat (limited to 'core/Command/Background/Delete.php')
-rw-r--r-- | core/Command/Background/Delete.php | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/core/Command/Background/Delete.php b/core/Command/Background/Delete.php index 8d57d18dfd0..50ae309065b 100644 --- a/core/Command/Background/Delete.php +++ b/core/Command/Background/Delete.php @@ -2,31 +2,15 @@ declare(strict_types=1); /** - * @copyright Copyright (c) 2024, Maxence Lange <maxence@artificial-owl.com> - * - * @author Maxence Lange <maxence@artificial-owl.com> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OC\Core\Command\Background; use OC\Core\Command\Base; use OCP\BackgroundJob\IJobList; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -51,7 +35,7 @@ class Delete extends Base { } protected function execute(InputInterface $input, OutputInterface $output): int { - $jobId = (int) $input->getArgument('job-id'); + $jobId = (int)$input->getArgument('job-id'); $job = $this->jobList->getById($jobId); if ($job === null) { @@ -68,6 +52,7 @@ class Delete extends Base { '/^(y|Y)/i' ); + /** @var QuestionHelper $helper */ $helper = $this->getHelper('question'); if (!$helper->ask($input, $output, $question)) { $output->writeln('aborted.'); |