diff options
author | provokateurin <kate@provokateurin.de> | 2024-10-08 15:13:16 +0200 |
---|---|---|
committer | Kate <26026535+provokateurin@users.noreply.github.com> | 2024-10-23 13:24:18 +0200 |
commit | 0de4843b73ee4779c7e455dd80c36a6b506e0024 (patch) | |
tree | 67ad68f0b4c925a65b029bdfcaafe5681c527d3a /lib/private/Files/Storage/DAV.php | |
parent | 74cd6e295a8e2e7c64e4fe38ba775986c57509a4 (diff) | |
download | nextcloud-server-refactor/storage/constructors.tar.gz nextcloud-server-refactor/storage/constructors.zip |
refactor(Storage): Align all Storage constructorsrefactor/storage/constructors
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib/private/Files/Storage/DAV.php')
-rw-r--r-- | lib/private/Files/Storage/DAV.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index e0f7700415f..b849a69246f 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -83,14 +83,14 @@ class DAV extends Common { ]; /** - * @param array $params + * @param array $parameters * @throws \Exception */ - public function __construct($params) { + public function __construct(array $parameters) { $this->statCache = new ArrayCache(); $this->httpClientService = Server::get(IClientService::class); - if (isset($params['host']) && isset($params['user']) && isset($params['password'])) { - $host = $params['host']; + if (isset($parameters['host']) && isset($parameters['user']) && isset($parameters['password'])) { + $host = $parameters['host']; //remove leading http[s], will be generated in createBaseUri() if (str_starts_with($host, 'https://')) { $host = substr($host, 8); @@ -98,16 +98,16 @@ class DAV extends Common { $host = substr($host, 7); } $this->host = $host; - $this->user = $params['user']; - $this->password = $params['password']; - if (isset($params['authType'])) { - $this->authType = $params['authType']; + $this->user = $parameters['user']; + $this->password = $parameters['password']; + if (isset($parameters['authType'])) { + $this->authType = $parameters['authType']; } - if (isset($params['secure'])) { - if (is_string($params['secure'])) { - $this->secure = ($params['secure'] === 'true'); + if (isset($parameters['secure'])) { + if (is_string($parameters['secure'])) { + $this->secure = ($parameters['secure'] === 'true'); } else { - $this->secure = (bool)$params['secure']; + $this->secure = (bool)$parameters['secure']; } } else { $this->secure = false; @@ -116,7 +116,7 @@ class DAV extends Common { // inject mock for testing $this->certManager = \OC::$server->getCertificateManager(); } - $this->root = $params['root'] ?? '/'; + $this->root = $parameters['root'] ?? '/'; $this->root = '/' . ltrim($this->root, '/'); $this->root = rtrim($this->root, '/') . '/'; } else { |