Code Duplication    Length = 9-9 lines in 3 locations

apps/federatedfilesharing/lib/AddressHandler.php 1 location

@@ 183-191 (lines=9) @@
180
	 * @param string $remote
181
	 * @return string
182
	 */
183
	protected function fixRemoteURL($remote) {
184
		$remote = \str_replace('\\', '/', $remote);
185
		if ($fileNamePosition = \strpos($remote, '/index.php')) {
186
			$remote = \substr($remote, 0, $fileNamePosition);
187
		}
188
		$remote = \rtrim($remote, '/');
189
190
		return $remote;
191
	}
192
}
193

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