Code Duplication    Length = 9-9 lines in 3 locations

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

@@ 514-522 (lines=9) @@
511
	 * @param string $remote
512
	 * @return string
513
	 */
514
	protected function fixRemoteURL($remote) {
515
		$remote = \str_replace('\\', '/', $remote);
516
		if ($fileNamePosition = \strpos($remote, '/index.php')) {
517
			$remote = \substr($remote, 0, $fileNamePosition);
518
		}
519
		$remote = \rtrim($remote, '/');
520
521
		return $remote;
522
	}
523
524
	/**
525
	 * @NoAdminRequired

lib/private/Share/Helper.php 1 location

@@ 179-187 (lines=9) @@
176
	 * @param string $remote
177
	 * @return string
178
	 */
179
	protected static function fixRemoteURL($remote) {
180
		$remote = \str_replace('\\', '/', $remote);
181
		if ($fileNamePosition = \strpos($remote, '/index.php')) {
182
			$remote = \substr($remote, 0, $fileNamePosition);
183
		}
184
		$remote = \rtrim($remote, '/');
185
186
		return $remote;
187
	}
188
189
	/**
190
	 * split user and remote from federated cloud id

apps/federatedfilesharing/lib/AddressHandler.php 1 location

@@ 146-154 (lines=9) @@
143
	 * @param string $remote
144
	 * @return string
145
	 */
146
	protected function fixRemoteURL($remote) {
147
		$remote = \str_replace('\\', '/', $remote);
148
		if ($fileNamePosition = \strpos($remote, '/index.php')) {
149
			$remote = \substr($remote, 0, $fileNamePosition);
150
		}
151
		$remote = \rtrim($remote, '/');
152
153
		return $remote;
154
	}
155
}
156