Code Duplication    Length = 9-9 lines in 3 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

apps/files_sharing/lib/Controller/ShareesAPIController.php 1 location

@@ 393-401 (lines=9) @@
390
	 * @param string $remote
391
	 * @return string
392
	 */
393
	protected function fixRemoteURL($remote) {
394
		$remote = str_replace('\\', '/', $remote);
395
		if ($fileNamePosition = strpos($remote, '/index.php')) {
396
			$remote = substr($remote, 0, $fileNamePosition);
397
		}
398
		$remote = rtrim($remote, '/');
399
400
		return $remote;
401
	}
402
403
	/**
404
	 * @NoAdminRequired

lib/private/Federation/CloudIdManager.php 1 location

@@ 92-100 (lines=9) @@
89
	 * @param string $remote
90
	 * @return string
91
	 */
92
	protected function fixRemoteURL($remote) {
93
		$remote = str_replace('\\', '/', $remote);
94
		if ($fileNamePosition = strpos($remote, '/index.php')) {
95
			$remote = substr($remote, 0, $fileNamePosition);
96
		}
97
		$remote = rtrim($remote, '/');
98
99
		return $remote;
100
	}
101
102
	/**
103
	 * @param string $cloudId