Code Duplication    Length = 15-16 lines in 2 locations

lib/Circles/FileSharingBroadcaster.php 1 location

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

lib/GlobalScale/MemberAdd.php 1 location

@@ 302-316 (lines=15) @@
299
	 * @return array
300
	 * @throws TokenDoesNotExistException
301
	 */
302
	private function getMailLinkFromShare(array $share, Member $member, string $password = '') {
303
		$sharesToken = $this->tokensRequest->generateTokenForMember($member, (int)$share['id'], $password);
304
		$link = $this->urlGenerator->linkToRouteAbsolute(
305
			'files_sharing.sharecontroller.showShare',
306
			['token' => $sharesToken->getToken()]
307
		);
308
		$author = $share['uid_initiator'];
309
		$filename = basename($share['file_target']);
310
311
		return [
312
			'author'   => $author,
313
			'link'     => $link,
314
			'filename' => $filename
315
		];
316
	}
317
318
319
	/**