aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User
diff options
context:
space:
mode:
authorHamid Dehnavi <hamid.dev.pro@gmail.com>2023-07-07 04:54:20 +0330
committerHamid Dehnavi <hamid.dev.pro@gmail.com>2023-07-07 04:54:20 +0330
commitd0b20534b94d0295472ab22157a2bc4c2c9fb703 (patch)
tree11778f60be448d4a2eb9e0d66d2cd1a164898c01 /lib/private/User
parent56402460121080cb0d63e4c4d4ec51e5b409fed2 (diff)
downloadnextcloud-server-d0b20534b94d0295472ab22157a2bc4c2c9fb703.tar.gz
nextcloud-server-d0b20534b94d0295472ab22157a2bc4c2c9fb703.zip
Refactor "substr" calls to improve code readability
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Diffstat (limited to 'lib/private/User')
-rw-r--r--lib/private/User/User.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index dc4cdec1235..e57b71b1778 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -610,7 +610,7 @@ class User implements IUser {
public function getCloudId() {
$uid = $this->getUID();
$server = rtrim($this->urlGenerator->getAbsoluteURL('/'), '/');
- if (substr($server, -10) === '/index.php') {
+ if (str_ends_with($server, '/index.php')) {
$server = substr($server, 0, -10);
}
$server = $this->removeProtocolFromUrl($server);