Code Duplication    Length = 5-8 lines in 2 locations

apps/federation/lib/TrustedServers.php 1 location

@@ 267-274 (lines=8) @@
264
	 * @return string
265
	 */
266
	protected function updateProtocol($url) {
267
		if (
268
			strpos($url, 'https://') === 0
269
			|| strpos($url, 'http://') === 0
270
		) {
271
272
			return $url;
273
274
		}
275
276
		return 'https://' . $url;
277
	}

apps/federatedfilesharing/lib/AddressHandler.php 1 location

@@ 146-150 (lines=5) @@
143
	 * @return bool
144
	 */
145
	public function urlContainProtocol($url) {
146
		if (strpos($url, 'https://') === 0 ||
147
			strpos($url, 'http://') === 0) {
148
149
			return true;
150
		}
151
152
		return false;
153
	}