Code Duplication    Length = 9-9 lines in 2 locations

lib/private/Share/Helper.php 1 location

@@ 234-242 (lines=9) @@
231
	 * @param string $remote
232
	 * @return string
233
	 */
234
	protected static function fixRemoteURL($remote) {
235
		$remote = str_replace('\\', '/', $remote);
236
		if ($fileNamePosition = strpos($remote, '/index.php')) {
237
			$remote = substr($remote, 0, $fileNamePosition);
238
		}
239
		$remote = rtrim($remote, '/');
240
241
		return $remote;
242
	}
243
244
	/**
245
	 * split user and remote from federated cloud id

lib/private/Federation/CloudIdManager.php 1 location

@@ 98-106 (lines=9) @@
95
	 * @param string $remote
96
	 * @return string
97
	 */
98
	protected function fixRemoteURL(string $remote): string {
99
		$remote = str_replace('\\', '/', $remote);
100
		if ($fileNamePosition = strpos($remote, '/index.php')) {
101
			$remote = substr($remote, 0, $fileNamePosition);
102
		}
103
		$remote = rtrim($remote, '/');
104
105
		return $remote;
106
	}
107
108
	/**
109
	 * @param string $cloudId