diff options
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r-- | apps/files_trashbin/lib/Command/CleanUp.php | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/apps/files_trashbin/lib/Command/CleanUp.php b/apps/files_trashbin/lib/Command/CleanUp.php index 007e97123bf..daaa4003f7a 100644 --- a/apps/files_trashbin/lib/Command/CleanUp.php +++ b/apps/files_trashbin/lib/Command/CleanUp.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -19,25 +20,12 @@ use Symfony\Component\Console\Output\OutputInterface; class CleanUp extends Command { - /** @var IUserManager */ - protected $userManager; - - /** @var IRootFolder */ - protected $rootFolder; - - /** @var \OCP\IDBConnection */ - protected $dbConnection; - - /** - * @param IRootFolder $rootFolder - * @param IUserManager $userManager - * @param IDBConnection $dbConnection - */ - public function __construct(IRootFolder $rootFolder, IUserManager $userManager, IDBConnection $dbConnection) { + public function __construct( + protected IRootFolder $rootFolder, + protected IUserManager $userManager, + protected IDBConnection $dbConnection, + ) { parent::__construct(); - $this->userManager = $userManager; - $this->rootFolder = $rootFolder; - $this->dbConnection = $dbConnection; } protected function configure() { @@ -119,7 +107,7 @@ class CleanUp extends Command { $query->delete('files_trash') ->where($query->expr()->eq('user', $query->createParameter('uid'))) ->setParameter('uid', $uid); - $query->execute(); + $query->executeStatement(); } else { if ($verbose) { $output->writeln("No trash found for <info>$uid</info>"); |