Code Duplication    Length = 28-30 lines in 2 locations

apps/files_sharing/lib/Controller/Share20OcsController.php 1 location

@@ 82-111 (lines=30) @@
79
	 */
80
	private $additionalInfoField;
81
82
	public function __construct(
83
		$appName,
84
		IRequest $request,
85
		IManager $shareManager,
86
		IGroupManager $groupManager,
87
		IUserManager $userManager,
88
		IRootFolder $rootFolder,
89
		IURLGenerator $urlGenerator,
90
		IUser $currentUser,
91
		IL10N $l10n,
92
		IConfig $config,
93
		NotificationPublisher $notificationPublisher,
94
		EventDispatcher $eventDispatcher,
95
		SharingBlacklist $sharingBlacklist
96
	) {
97
		parent::__construct($appName, $request);
98
		$this->request = $request;
99
		$this->shareManager = $shareManager;
100
		$this->groupManager = $groupManager;
101
		$this->userManager = $userManager;
102
		$this->rootFolder = $rootFolder;
103
		$this->urlGenerator = $urlGenerator;
104
		$this->currentUser = $currentUser;
105
		$this->l = $l10n;
106
		$this->config = $config;
107
		$this->notificationPublisher = $notificationPublisher;
108
		$this->eventDispatcher = $eventDispatcher;
109
		$this->sharingBlacklist = $sharingBlacklist;
110
		$this->additionalInfoField = $this->config->getAppValue('core', 'user_additional_info_field', '');
111
	}
112
113
	/**
114
	 * Returns the additional info to display behind the display name as configured.

apps/files_sharing/lib/Controller/ShareesController.php 1 location

@@ 129-156 (lines=28) @@
126
	 * @param ILogger $logger
127
	 * @param \OCP\Share\IManager $shareManager
128
	 */
129
	public function __construct($appName,
130
			IRequest $request,
131
			IGroupManager $groupManager,
132
			IUserManager $userManager,
133
			IManager $contactsManager,
134
			IConfig $config,
135
			IUserSession $userSession,
136
			IURLGenerator $urlGenerator,
137
			ILogger $logger,
138
			\OCP\Share\IManager $shareManager,
139
			SharingBlacklist $sharingBlacklist,
140
			FederatedShareProvider $federatedShareProvider
141
		) {
142
		parent::__construct($appName, $request);
143
144
		$this->groupManager = $groupManager;
145
		$this->userManager = $userManager;
146
		$this->contactsManager = $contactsManager;
147
		$this->config = $config;
148
		$this->userSession = $userSession;
149
		$this->urlGenerator = $urlGenerator;
150
		$this->request = $request;
151
		$this->logger = $logger;
152
		$this->shareManager = $shareManager;
153
		$this->sharingBlacklist = $sharingBlacklist;
154
		$this->additionalInfoField = $this->config->getAppValue('core', 'user_additional_info_field', '');
155
		$this->federatedShareProvider = $federatedShareProvider;
156
	}
157
158
	/**
159
	 * @param string $search