aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorHamid Dehnavi <hamid.dev.pro@gmail.com>2023-07-07 13:50:21 +0330
committerHamid Dehnavi <hamid.dev.pro@gmail.com>2023-09-28 12:18:41 +0330
commitd64bbc8bd3a6a272dd5c550916a6b80222f19e13 (patch)
tree1b56193c101e936e79478448c41af9b1f87521f5 /apps/files_external
parent456aea80420d7d4fc8dc853d9953687ed3f89ace (diff)
downloadnextcloud-server-d64bbc8bd3a6a272dd5c550916a6b80222f19e13.tar.gz
nextcloud-server-d64bbc8bd3a6a272dd5c550916a6b80222f19e13.zip
Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php4
-rw-r--r--apps/files_external/lib/Command/Import.php4
-rw-r--r--apps/files_external/lib/MountConfig.php4
3 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php
index 00f01af7dd5..28cd871145e 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/Wrapped/Parser.php
@@ -144,8 +144,8 @@ class Parser {
// A line = explode statement may not fill all array elements
// properly. May happen when accessing non Windows Fileservers
$words = explode(':', $line, 2);
- $name = isset($words[0]) ? $words[0] : '';
- $value = isset($words[1]) ? $words[1] : '';
+ $name = $words[0] ?? '';
+ $value = $words[1] ?? '';
$value = trim($value);
if (!isset($data[$name])) {
diff --git a/apps/files_external/lib/Command/Import.php b/apps/files_external/lib/Command/Import.php
index eab7dd9a6be..afd8f2ac0fa 100644
--- a/apps/files_external/lib/Command/Import.php
+++ b/apps/files_external/lib/Command/Import.php
@@ -178,8 +178,8 @@ class Import extends Base {
$mount->setAuthMechanism($authBackend);
$mount->setBackendOptions($data['configuration']);
$mount->setMountOptions($data['options']);
- $mount->setApplicableUsers(isset($data['applicable_users']) ? $data['applicable_users'] : []);
- $mount->setApplicableGroups(isset($data['applicable_groups']) ? $data['applicable_groups'] : []);
+ $mount->setApplicableUsers($data['applicable_users'] ?? []);
+ $mount->setApplicableGroups($data['applicable_groups'] ?? []);
return $mount;
}
diff --git a/apps/files_external/lib/MountConfig.php b/apps/files_external/lib/MountConfig.php
index ff631d82e26..98b34b0c9f2 100644
--- a/apps/files_external/lib/MountConfig.php
+++ b/apps/files_external/lib/MountConfig.php
@@ -276,8 +276,8 @@ class MountConfig {
'a' => $config['authMechanism'],
'm' => $config['mountpoint'],
'o' => $config['options'],
- 'p' => isset($config['priority']) ? $config['priority'] : -1,
- 'mo' => isset($config['mountOptions']) ? $config['mountOptions'] : [],
+ 'p' => $config['priority'] ?? -1,
+ 'mo' => $config['mountOptions'] ?? [],
]
);
return hash('md5', $data);