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

lib/private/Collaboration/Collaborators/RemotePlugin.php 1 location

@@ 129-136 (lines=8) @@
126
	 * @return array [user, remoteURL]
127
	 * @throws \InvalidArgumentException
128
	 */
129
	public function splitUserRemote($address) {
130
		try {
131
			$cloudId = $this->cloudIdManager->resolveCloudId($address);
132
			return [$cloudId->getUser(), $cloudId->getRemote()];
133
		} catch (\InvalidArgumentException $e) {
134
			throw new \InvalidArgumentException('Invalid Federated Cloud ID', 0, $e);
135
		}
136
	}
137
}
138