aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Federation/CloudIdManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Federation/CloudIdManager.php')
-rw-r--r--lib/private/Federation/CloudIdManager.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/Federation/CloudIdManager.php b/lib/private/Federation/CloudIdManager.php
index 85aae8e5ec5..82b711bd422 100644
--- a/lib/private/Federation/CloudIdManager.php
+++ b/lib/private/Federation/CloudIdManager.php
@@ -209,11 +209,12 @@ class CloudIdManager implements ICloudIdManager {
* @param string $url
* @return string
*/
- private function removeProtocolFromUrl($url) {
- if (strpos($url, 'https://') === 0) {
- return substr($url, strlen('https://'));
- } elseif (strpos($url, 'http://') === 0) {
- return substr($url, strlen('http://'));
+ public function removeProtocolFromUrl(string $url): string {
+ if (str_starts_with($url, 'https://')) {
+ return substr($url, 8);
+ }
+ if (str_starts_with($url, 'http://')) {
+ return substr($url, 7);
}
return $url;