Code Duplication    Length = 11-11 lines in 6 locations

apps/comments/lib/Activity/Provider.php 1 location

@@ 211-221 (lines=11) @@
208
	 * @param string $uid
209
	 * @return array
210
	 */
211
	protected function generateUserParameter($uid) {
212
		if (!isset($this->displayNames[$uid])) {
213
			$this->displayNames[$uid] = $this->getDisplayName($uid);
214
		}
215
216
		return [
217
			'type' => 'user',
218
			'id' => $uid,
219
			'name' => $this->displayNames[$uid],
220
		];
221
	}
222
223
	/**
224
	 * @param string $uid

apps/files_sharing/lib/Activity/Providers/Groups.php 1 location

@@ 237-247 (lines=11) @@
234
	 * @param string $uid
235
	 * @return array
236
	 */
237
	protected function generateUserParameter($uid) {
238
		if (!isset($this->displayNames[$uid])) {
239
			$this->displayNames[$uid] = $this->getDisplayName($uid);
240
		}
241
242
		return [
243
			'type' => 'user',
244
			'id' => $uid,
245
			'name' => $this->displayNames[$uid],
246
		];
247
	}
248
249
	/**
250
	 * @param string $uid

apps/files_sharing/lib/Activity/Providers/PublicLinks.php 1 location

@@ 244-254 (lines=11) @@
241
	 * @param string $uid
242
	 * @return array
243
	 */
244
	protected function generateUserParameter($uid) {
245
		if (!isset($this->displayNames[$uid])) {
246
			$this->displayNames[$uid] = $this->getDisplayName($uid);
247
		}
248
249
		return [
250
			'type' => 'user',
251
			'id' => $uid,
252
			'name' => $this->displayNames[$uid],
253
		];
254
	}
255
256
	/**
257
	 * @param string $uid

apps/files_sharing/lib/Activity/Providers/Users.php 1 location

@@ 265-275 (lines=11) @@
262
	 * @param string $uid
263
	 * @return array
264
	 */
265
	protected function generateUserParameter($uid) {
266
		if (!isset($this->displayNames[$uid])) {
267
			$this->displayNames[$uid] = $this->getDisplayName($uid);
268
		}
269
270
		return [
271
			'type' => 'user',
272
			'id' => $uid,
273
			'name' => $this->displayNames[$uid],
274
		];
275
	}
276
277
	/**
278
	 * @param string $uid

apps/systemtags/lib/Activity/Provider.php 1 location

@@ 291-301 (lines=11) @@
288
		];
289
	}
290
291
	protected function getUserParameter($uid) {
292
		if (!isset($this->displayNames[$uid])) {
293
			$this->displayNames[$uid] = $this->getDisplayName($uid);
294
		}
295
296
		return [
297
			'type' => 'user',
298
			'id' => $uid,
299
			'name' => $this->displayNames[$uid],
300
		];
301
	}
302
303
	protected function generatePlainSystemTag(array $parameter) {
304
		if ($parameter['assignable'] === '1') {

apps/files/lib/Activity/Provider.php 1 location

@@ 278-288 (lines=11) @@
275
		];
276
	}
277
278
	protected function getRichUserParameter($uid) {
279
		if (!isset($this->displayNames[$uid])) {
280
			$this->displayNames[$uid] = $this->getDisplayName($uid);
281
		}
282
283
		return [
284
			'type' => 'user',
285
			'id' => $uid,
286
			'name' => $this->displayNames[$uid],
287
		];
288
	}
289
290
	/**
291
	 * @param string $uid