Code Duplication    Length = 9-9 lines in 3 locations

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

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

apps/federatedfilesharing/lib/AddressHandler.php 1 location

@@ 159-167 (lines=9) @@
156
	 * @param string $remote
157
	 * @return string
158
	 */
159
	protected function fixRemoteURL($remote) {
160
		$remote = \str_replace('\\', '/', $remote);
161
		if ($fileNamePosition = \strpos($remote, '/index.php')) {
162
			$remote = \substr($remote, 0, $fileNamePosition);
163
		}
164
		$remote = \rtrim($remote, '/');
165
166
		return $remote;
167
	}
168
}
169