Code Duplication    Length = 9-9 lines in 3 locations

apps/federatedfilesharing/lib/AddressHandler.php 1 location

@@ 175-183 (lines=9) @@
172
	 * @param string $remote
173
	 * @return string
174
	 */
175
	protected function fixRemoteURL($remote) {
176
		$remote = \str_replace('\\', '/', $remote);
177
		if ($fileNamePosition = \strpos($remote, '/index.php')) {
178
			$remote = \substr($remote, 0, $fileNamePosition);
179
		}
180
		$remote = \rtrim($remote, '/');
181
182
		return $remote;
183
	}
184
}
185

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

@@ 507-515 (lines=9) @@
504
	 * @param string $remote
505
	 * @return string
506
	 */
507
	protected function fixRemoteURL($remote) {
508
		$remote = \str_replace('\\', '/', $remote);
509
		if ($fileNamePosition = \strpos($remote, '/index.php')) {
510
			$remote = \substr($remote, 0, $fileNamePosition);
511
		}
512
		$remote = \rtrim($remote, '/');
513
514
		return $remote;
515
	}
516
517
	/**
518
	 * @NoAdminRequired

lib/private/Share/Helper.php 1 location

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