Code Duplication    Length = 9-9 lines in 3 locations

lib/private/Share/Share.php 1 location

@@ 2625-2633 (lines=9) @@
2622
	 * @param string $url
2623
	 * @return string
2624
	 */
2625
	public static function removeProtocolFromUrl($url) {
2626
		if (\strpos($url, 'https://') === 0) {
2627
			return \substr($url, \strlen('https://'));
2628
		} elseif (\strpos($url, 'http://') === 0) {
2629
			return \substr($url, \strlen('http://'));
2630
		}
2631
2632
		return $url;
2633
	}
2634
2635
	/**
2636
	 * try http post first with https and then with http as a fallback

lib/private/User/RemoteUser.php 1 location

@@ 180-188 (lines=9) @@
177
	 * @param string $url
178
	 * @return string
179
	 */
180
	private function removeProtocolFromUrl($url) {
181
		if (\strpos($url, 'https://') === 0) {
182
			return \substr($url, \strlen('https://'));
183
		} elseif (\strpos($url, 'http://') === 0) {
184
			return \substr($url, \strlen('http://'));
185
		}
186
187
		return $url;
188
	}
189
190
	/**
191
	 * @inheritdoc

lib/private/User/User.php 1 location

@@ 500-508 (lines=9) @@
497
	 * @param string $url
498
	 * @return string
499
	 */
500
	private function removeProtocolFromUrl($url) {
501
		if (\strpos($url, 'https://') === 0) {
502
			return \substr($url, \strlen('https://'));
503
		} elseif (\strpos($url, 'http://') === 0) {
504
			return \substr($url, \strlen('http://'));
505
		}
506
507
		return $url;
508
	}
509
510
	public function triggerChange($feature, $value = null) {
511
		if ($this->emitter && \in_array($feature, $this->account->getUpdatedFields())) {