Code Duplication    Length = 9-9 lines in 3 locations

lib/private/Share/Share.php 1 location

@@ 596-604 (lines=9) @@
593
	 * @param string $url
594
	 * @return string
595
	 */
596
	public static function removeProtocolFromUrl($url) {
597
		if (\strpos($url, 'https://') === 0) {
598
			return \substr($url, \strlen('https://'));
599
		} elseif (\strpos($url, 'http://') === 0) {
600
			return \substr($url, \strlen('http://'));
601
		}
602
603
		return $url;
604
	}
605
606
	/**
607
	 * try http post first with https and then with http as a fallback

lib/private/User/RemoteUser.php 1 location

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

lib/private/User/User.php 1 location

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