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/ObjectStore/ObjectStoreStorage.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/ObjectStore/ObjectStoreStorage.php')
-rw-r--r-- | lib/private/Files/ObjectStore/ObjectStoreStorage.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index b07b6955b1a..0963ffbb28f 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -41,27 +41,27 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil private bool $preserveCacheItemsOnDelete = false; /** - * @param array $params + * @param array $parameters * @throws \Exception */ - public function __construct($params) { - if (isset($params['objectstore']) && $params['objectstore'] instanceof IObjectStore) { - $this->objectStore = $params['objectstore']; + public function __construct(array $parameters) { + if (isset($parameters['objectstore']) && $parameters['objectstore'] instanceof IObjectStore) { + $this->objectStore = $parameters['objectstore']; } else { throw new \Exception('missing IObjectStore instance'); } - if (isset($params['storageid'])) { - $this->id = 'object::store:' . $params['storageid']; + if (isset($parameters['storageid'])) { + $this->id = 'object::store:' . $parameters['storageid']; } else { $this->id = 'object::store:' . $this->objectStore->getStorageId(); } - if (isset($params['objectPrefix'])) { - $this->objectPrefix = $params['objectPrefix']; + if (isset($parameters['objectPrefix'])) { + $this->objectPrefix = $parameters['objectPrefix']; } - if (isset($params['validateWrites'])) { - $this->validateWrites = (bool)$params['validateWrites']; + if (isset($parameters['validateWrites'])) { + $this->validateWrites = (bool)$parameters['validateWrites']; } - $this->handleCopiesAsOwned = (bool)($params['handleCopiesAsOwned'] ?? false); + $this->handleCopiesAsOwned = (bool)($parameters['handleCopiesAsOwned'] ?? false); $this->logger = \OCP\Server::get(LoggerInterface::class); } |