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

@@ 275-289 (lines=15) @@
272
	 * @return array
273
	 * @throws TokenDoesNotExistException
274
	 */
275
	private function getMailLinkFromShare(array $share, Member $member, string $password = '') {
276
		$sharesToken = $this->tokensRequest->generateTokenForMember($member, (int)$share['id'], $password);
277
		$link = $this->urlGenerator->linkToRouteAbsolute(
278
			'files_sharing.sharecontroller.showShare',
279
			['token' => $sharesToken->getToken()]
280
		);
281
		$author = $share['uid_initiator'];
282
		$filename = basename($share['file_target']);
283
284
		return [
285
			'author'   => $author,
286
			'link'     => $link,
287
			'filename' => $filename
288
		];
289
	}
290
291
292
	/**