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

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