aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/External/MountProvider.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/External/MountProvider.php')
-rw-r--r--apps/files_sharing/lib/External/MountProvider.php25
1 files changed, 10 insertions, 15 deletions
diff --git a/apps/files_sharing/lib/External/MountProvider.php b/apps/files_sharing/lib/External/MountProvider.php
index 2c639543a87..a5781d5d35a 100644
--- a/apps/files_sharing/lib/External/MountProvider.php
+++ b/apps/files_sharing/lib/External/MountProvider.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -10,36 +11,30 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\Federation\ICloudIdManager;
use OCP\Files\Config\IMountProvider;
use OCP\Files\Storage\IStorageFactory;
+use OCP\Http\Client\IClientService;
use OCP\IDBConnection;
use OCP\IUser;
+use OCP\Server;
class MountProvider implements IMountProvider {
public const STORAGE = '\OCA\Files_Sharing\External\Storage';
/**
- * @var \OCP\IDBConnection
- */
- private $connection;
-
- /**
* @var callable
*/
private $managerProvider;
/**
- * @var ICloudIdManager
- */
- private $cloudIdManager;
-
- /**
- * @param \OCP\IDBConnection $connection
+ * @param IDBConnection $connection
* @param callable $managerProvider due to setup order we need a callable that return the manager instead of the manager itself
* @param ICloudIdManager $cloudIdManager
*/
- public function __construct(IDBConnection $connection, callable $managerProvider, ICloudIdManager $cloudIdManager) {
- $this->connection = $connection;
+ public function __construct(
+ private IDBConnection $connection,
+ callable $managerProvider,
+ private ICloudIdManager $cloudIdManager,
+ ) {
$this->managerProvider = $managerProvider;
- $this->cloudIdManager = $cloudIdManager;
}
public function getMount(IUser $user, $data, IStorageFactory $storageFactory) {
@@ -50,7 +45,7 @@ class MountProvider implements IMountProvider {
$data['mountpoint'] = $mountPoint;
$data['cloudId'] = $this->cloudIdManager->getCloudId($data['owner'], $data['remote']);
$data['certificateManager'] = \OC::$server->getCertificateManager();
- $data['HttpClientService'] = \OC::$server->getHTTPClientService();
+ $data['HttpClientService'] = Server::get(IClientService::class);
return new Mount(self::STORAGE, $mountPoint, $data, $manager, $storageFactory);
}