diff options
author | Robin Appelman <robin@icewind.nl> | 2023-06-01 23:10:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 23:10:00 +0200 |
commit | 9f1d497a0b4dbda86e676a3a55758bc2909cc781 (patch) | |
tree | 968db9431470d4d0e1ea7c80caed373fc9029120 /lib/private/Files/Storage/DAV.php | |
parent | e81fdfefab6d46b9d326b70c278d52fbb941a431 (diff) | |
parent | fa31c707c0a4c2a72141b8017e66561710185a06 (diff) | |
download | nextcloud-server-9f1d497a0b4dbda86e676a3a55758bc2909cc781.tar.gz nextcloud-server-9f1d497a0b4dbda86e676a3a55758bc2909cc781.zip |
Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_private
Refactors "strpos" calls in lib/private to improve code readability.
Diffstat (limited to 'lib/private/Files/Storage/DAV.php')
-rw-r--r-- | lib/private/Files/Storage/DAV.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index a791db651c3..733aa10cde6 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -770,16 +770,16 @@ class DAV extends Common { */ protected function parsePermissions($permissionsString) { $permissions = Constants::PERMISSION_READ; - if (strpos($permissionsString, 'R') !== false) { + if (str_contains($permissionsString, 'R')) { $permissions |= Constants::PERMISSION_SHARE; } - if (strpos($permissionsString, 'D') !== false) { + if (str_contains($permissionsString, 'D')) { $permissions |= Constants::PERMISSION_DELETE; } - if (strpos($permissionsString, 'W') !== false) { + if (str_contains($permissionsString, 'W')) { $permissions |= Constants::PERMISSION_UPDATE; } - if (strpos($permissionsString, 'CK') !== false) { + if (str_contains($permissionsString, 'CK')) { $permissions |= Constants::PERMISSION_CREATE; $permissions |= Constants::PERMISSION_UPDATE; } |