Code Duplication    Length = 15-16 lines in 2 locations

lib/Circles/FileSharingBroadcaster.php 1 location

@@ 708-723 (lines=16) @@
705
	 * @return array
706
	 * @throws TokenDoesNotExistException
707
	 */
708
	private function getMailLinkFromShare(array $share, Member $member, string $password = '') {
709
		$sharesToken = $this->tokensRequest->generateTokenForMember($member, $share['id'], $password);
710
		$link = $this->urlGenerator->linkToRouteAbsolute(
711
			'files_sharing.sharecontroller.showShare',
712
			['token' => $sharesToken->getToken()]
713
		);
714
		$author = $share['uid_initiator'];
715
716
		$filename = basename($share['file_target']);
717
718
		return [
719
			'author'   => $author,
720
			'link'     => $link,
721
			'filename' => $filename
722
		];
723
	}
724
725
726
	/**

lib/GlobalScale/MemberAdd.php 1 location

@@ 247-261 (lines=15) @@
244
	 * @return array
245
	 * @throws TokenDoesNotExistException
246
	 */
247
	private function getMailLinkFromShare(array $share, Member $member, string $password = '') {
248
		$sharesToken = $this->tokensRequest->generateTokenForMember($member, (int)$share['id'], $password);
249
		$link = $this->urlGenerator->linkToRouteAbsolute(
250
			'files_sharing.sharecontroller.showShare',
251
			['token' => $sharesToken->getToken()]
252
		);
253
		$author = $share['uid_initiator'];
254
		$filename = basename($share['file_target']);
255
256
		return [
257
			'author'   => $author,
258
			'link'     => $link,
259
			'filename' => $filename
260
		];
261
	}
262
263
264
	/**