diff options
author | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-07-07 13:43:21 +0330 |
---|---|---|
committer | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-09-28 17:44:19 +0330 |
commit | ea06cf2f39c5c4e7f1ea20d075c01e3ba0cc6dd0 (patch) | |
tree | 91e5cd5b937877bcc6aafac1c7cff24e6f1589a2 /lib/private/Files/Mount | |
parent | 45cac164322d6ce4d10db07b9207b7079694e2a4 (diff) | |
download | nextcloud-server-ea06cf2f39c5c4e7f1ea20d075c01e3ba0cc6dd0.tar.gz nextcloud-server-ea06cf2f39c5c4e7f1ea20d075c01e3ba0cc6dd0.zip |
Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Diffstat (limited to 'lib/private/Files/Mount')
-rw-r--r-- | lib/private/Files/Mount/MountPoint.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Mount/ObjectHomeMountProvider.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Files/Mount/MountPoint.php b/lib/private/Files/Mount/MountPoint.php index f526928cc15..fe6358b32f1 100644 --- a/lib/private/Files/Mount/MountPoint.php +++ b/lib/private/Files/Mount/MountPoint.php @@ -272,7 +272,7 @@ class MountPoint implements IMountPoint { * @return mixed */ public function getOption($name, $default) { - return isset($this->mountOptions[$name]) ? $this->mountOptions[$name] : $default; + return $this->mountOptions[$name] ?? $default; } /** diff --git a/lib/private/Files/Mount/ObjectHomeMountProvider.php b/lib/private/Files/Mount/ObjectHomeMountProvider.php index 77912adfd34..889a39fbd9e 100644 --- a/lib/private/Files/Mount/ObjectHomeMountProvider.php +++ b/lib/private/Files/Mount/ObjectHomeMountProvider.php @@ -122,7 +122,7 @@ class ObjectHomeMountProvider implements IHomeMountProvider { $config['arguments']['bucket'] = ''; } $mapper = new \OC\Files\ObjectStore\Mapper($user, $this->config); - $numBuckets = isset($config['arguments']['num_buckets']) ? $config['arguments']['num_buckets'] : 64; + $numBuckets = $config['arguments']['num_buckets'] ?? 64; $config['arguments']['bucket'] .= $mapper->getBucket($numBuckets); $this->config->setUserValue($user->getUID(), 'homeobjectstore', 'bucket', $config['arguments']['bucket']); |