Code Duplication    Length = 11-11 lines in 8 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/sharebymail/lib/Activity.php 1 location

@@ 217-227 (lines=11) @@
214
	 * @param string $uid
215
	 * @return array
216
	 */
217
	protected function generateUserParameter($uid) {
218
		if (!isset($this->displayNames[$uid])) {
219
			$this->displayNames[$uid] = $this->getDisplayName($uid);
220
		}
221
222
		return [
223
			'type' => 'user',
224
			'id' => $uid,
225
			'name' => $this->displayNames[$uid],
226
		];
227
	}
228
229
	/**
230
	 * @param string $email

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

@@ 253-263 (lines=11) @@
250
		];
251
	}
252
253
	protected function getRichUserParameter($uid) {
254
		if (!isset($this->displayNames[$uid])) {
255
			$this->displayNames[$uid] = $this->getDisplayName($uid);
256
		}
257
258
		return [
259
			'type' => 'user',
260
			'id' => $uid,
261
			'name' => $this->displayNames[$uid],
262
		];
263
	}
264
265
	/**
266
	 * @param string $uid

apps/dav/lib/CalDAV/Activity/Provider/Base.php 1 location

@@ 105-115 (lines=11) @@
102
	 * @param string $uid
103
	 * @return array
104
	 */
105
	protected function generateUserParameter($uid) {
106
		if (!isset($this->displayNames[$uid])) {
107
			$this->displayNames[$uid] = $this->getDisplayName($uid);
108
		}
109
110
		return [
111
			'type' => 'user',
112
			'id' => $uid,
113
			'name' => $this->displayNames[$uid],
114
		];
115
	}
116
117
	/**
118
	 * @param string $uid