Code Duplication    Length = 9-9 lines in 2 locations

lib/private/Share/Share.php 1 location

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

lib/private/User/User.php 1 location

@@ 411-419 (lines=9) @@
408
	 * @param string $url
409
	 * @return string
410
	 */
411
	private function removeProtocolFromUrl($url) {
412
		if (strpos($url, 'https://') === 0) {
413
			return substr($url, strlen('https://'));
414
		} else if (strpos($url, 'http://') === 0) {
415
			return substr($url, strlen('http://'));
416
		}
417
418
		return $url;
419
	}
420
421
	public function triggerChange($feature, $value = null) {
422
		if ($this->emitter) {