Code Duplication    Length = 8-9 lines in 2 locations

apps/federatedfilesharing/lib/AddressHandler.php 1 location

@@ 69-77 (lines=9) @@
66
	 * @return array [user, remoteURL]
67
	 * @throws HintException
68
	 */
69
	public function splitUserRemote($address) {
70
		try {
71
			$cloudId = $this->cloudIdManager->resolveCloudId($address);
72
			return [$cloudId->getUser(), $cloudId->getRemote()];
73
		} catch (\InvalidArgumentException $e) {
74
			$hint = $this->l->t('Invalid Federated Cloud ID');
75
			throw new HintException('Invalid Federated Cloud ID', $hint, 0, $e);
76
		}
77
	}
78
79
	/**
80
	 * generate remote URL part of federated ID

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

@@ 372-379 (lines=8) @@
369
	 * @return array [user, remoteURL]
370
	 * @throws \Exception
371
	 */
372
	public function splitUserRemote($address) {
373
		try {
374
			$cloudId = $this->cloudIdManager->resolveCloudId($address);
375
			return [$cloudId->getUser(), $cloudId->getRemote()];
376
		} catch (\InvalidArgumentException $e) {
377
			throw new \Exception('Invalid Federated Cloud ID', 0, $e);
378
		}
379
	}
380
381
	/**
382
	 * Strips away a potential file names and trailing slashes: