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

@@ 391-398 (lines=8) @@
388
	 * @return array [user, remoteURL]
389
	 * @throws \Exception
390
	 */
391
	public function splitUserRemote($address) {
392
		try {
393
			$cloudId = $this->cloudIdManager->resolveCloudId($address);
394
			return [$cloudId->getUser(), $cloudId->getRemote()];
395
		} catch (\InvalidArgumentException $e) {
396
			throw new \Exception('Invalid Federated Cloud ID', 0, $e);
397
		}
398
	}
399
400
	/**
401
	 * Strips away a potential file names and trailing slashes: