diff options
author | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-07-07 13:50:21 +0330 |
---|---|---|
committer | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-09-28 12:18:41 +0330 |
commit | d64bbc8bd3a6a272dd5c550916a6b80222f19e13 (patch) | |
tree | 1b56193c101e936e79478448c41af9b1f87521f5 /apps/files_external | |
parent | 456aea80420d7d4fc8dc853d9953687ed3f89ace (diff) | |
download | nextcloud-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.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Command/Import.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/MountConfig.php | 4 |
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); |