diff options
author | Faraz Samapoor <fsa@adlas.at> | 2023-06-12 18:40:19 +0330 |
---|---|---|
committer | Louis <6653109+artonge@users.noreply.github.com> | 2023-06-20 09:30:21 +0200 |
commit | c0a5bdea5e8c0ad50cd3237edd167a4d8b679049 (patch) | |
tree | 9b0d870a87aa88f07c8246b594978db3666310d2 /core/Command/Info | |
parent | 64c19ce3aab20cae15bd522428ae54548a76b78b (diff) | |
download | nextcloud-server-c0a5bdea5e8c0ad50cd3237edd167a4d8b679049.tar.gz nextcloud-server-c0a5bdea5e8c0ad50cd3237edd167a4d8b679049.zip |
Uses PHP8's constructor property promotion.
in core/Command/Info, /Integrity, and /Preview classes.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'core/Command/Info')
-rw-r--r-- | core/Command/Info/File.php | 7 | ||||
-rw-r--r-- | core/Command/Info/FileUtils.php | 17 | ||||
-rw-r--r-- | core/Command/Info/Space.php | 5 |
3 files changed, 7 insertions, 22 deletions
diff --git a/core/Command/Info/File.php b/core/Command/Info/File.php index 238c1e28140..d62feeb5a17 100644 --- a/core/Command/Info/File.php +++ b/core/Command/Info/File.php @@ -23,11 +23,12 @@ use Symfony\Component\Console\Output\OutputInterface; class File extends Command { private IL10N $l10n; - private FileUtils $fileUtils; - public function __construct(IFactory $l10nFactory, FileUtils $fileUtils) { + public function __construct( + IFactory $l10nFactory, + private FileUtils $fileUtils, + ) { $this->l10n = $l10nFactory->get("core"); - $this->fileUtils = $fileUtils; parent::__construct(); } diff --git a/core/Command/Info/FileUtils.php b/core/Command/Info/FileUtils.php index 1264dee5de2..000cb0eb3d6 100644 --- a/core/Command/Info/FileUtils.php +++ b/core/Command/Info/FileUtils.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace OC\Core\Command\Info; -use OC\Files\SetupManager; use OCA\Circles\MountManager\CircleMount; use OCA\Files_External\Config\ExternalMountPoint; use OCA\Files_Sharing\SharedMount; @@ -33,7 +32,6 @@ use OCP\Files\Config\IUserMountCache; use OCP\Files\FileInfo; use OCP\Files\IHomeStorage; use OCP\Files\IRootFolder; -use OCP\Files\Mount\IMountManager; use OCP\Files\Mount\IMountPoint; use OCP\Files\Node; use OCP\Files\NotFoundException; @@ -43,21 +41,10 @@ use Symfony\Component\Console\Output\OutputInterface; use OCP\Files\Folder; class FileUtils { - private IRootFolder $rootFolder; - private IUserMountCache $userMountCache; - private IMountManager $mountManager; - private SetupManager $setupManager; - public function __construct( - IRootFolder $rootFolder, - IUserMountCache $userMountCache, - IMountManager $mountManager, - SetupManager $setupManager + private IRootFolder $rootFolder, + private IUserMountCache $userMountCache, ) { - $this->rootFolder = $rootFolder; - $this->userMountCache = $userMountCache; - $this->mountManager = $mountManager; - $this->setupManager = $setupManager; } /** diff --git a/core/Command/Info/Space.php b/core/Command/Info/Space.php index 7f901ee729b..b552cf8b979 100644 --- a/core/Command/Info/Space.php +++ b/core/Command/Info/Space.php @@ -32,10 +32,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class Space extends Command { - private FileUtils $fileUtils; - - public function __construct(FileUtils $fileUtils) { - $this->fileUtils = $fileUtils; + public function __construct(private FileUtils $fileUtils) { parent::__construct(); } |