aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Command/Move.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib/Command/Move.php')
-rw-r--r--apps/files/lib/Command/Move.php32
1 files changed, 8 insertions, 24 deletions
diff --git a/apps/files/lib/Command/Move.php b/apps/files/lib/Command/Move.php
index af97563c816..29dd8860b2a 100644
--- a/apps/files/lib/Command/Move.php
+++ b/apps/files/lib/Command/Move.php
@@ -2,23 +2,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2023 Robin Appelman <robin@icewind.nl>
- *
- * @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: 2023 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Files\Command;
@@ -35,10 +20,9 @@ use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ConfirmationQuestion;
class Move extends Command {
- private FileUtils $fileUtils;
-
- public function __construct(FileUtils $fileUtils) {
- $this->fileUtils = $fileUtils;
+ public function __construct(
+ private FileUtils $fileUtils,
+ ) {
parent::__construct();
}
@@ -46,8 +30,8 @@ class Move extends Command {
$this
->setName('files:move')
->setDescription('Move a file or folder')
- ->addArgument('source', InputArgument::REQUIRED, "Source file id or path")
- ->addArgument('target', InputArgument::REQUIRED, "Target path")
+ ->addArgument('source', InputArgument::REQUIRED, 'Source file id or path')
+ ->addArgument('target', InputArgument::REQUIRED, 'Target path')
->addOption('force', 'f', InputOption::VALUE_NONE, "Don't ask for configuration and don't output any warnings");
}
@@ -103,7 +87,7 @@ class Move extends Command {
/** @var QuestionHelper $helper */
$helper = $this->getHelper('question');
- $question = new ConfirmationQuestion("<info>" . $targetInput . "</info> already exists, overwrite? [y/N] ", false);
+ $question = new ConfirmationQuestion('<info>' . $targetInput . '</info> already exists, overwrite? [y/N] ', false);
if (!$helper->ask($input, $output, $question)) {
return 1;
}