aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Command/Copy.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib/Command/Copy.php')
-rw-r--r--apps/files/lib/Command/Copy.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/files/lib/Command/Copy.php b/apps/files/lib/Command/Copy.php
index 9981497232f..ad0dfa90de1 100644
--- a/apps/files/lib/Command/Copy.php
+++ b/apps/files/lib/Command/Copy.php
@@ -19,10 +19,9 @@ use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ConfirmationQuestion;
class Copy extends Command {
- private FileUtils $fileUtils;
-
- public function __construct(FileUtils $fileUtils) {
- $this->fileUtils = $fileUtils;
+ public function __construct(
+ private FileUtils $fileUtils,
+ ) {
parent::__construct();
}
@@ -30,10 +29,10 @@ class Copy extends Command {
$this
->setName('files:copy')
->setDescription('Copy 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 confirmation and don't output any warnings")
- ->addOption('no-target-directory', 'T', InputOption::VALUE_NONE, "When target path is folder, overwrite the folder instead of copying into the folder");
+ ->addOption('no-target-directory', 'T', InputOption::VALUE_NONE, 'When target path is folder, overwrite the folder instead of copying into the folder');
}
public function execute(InputInterface $input, OutputInterface $output): int {
@@ -98,7 +97,7 @@ class Copy 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;
}