Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 176-183 (lines=8) @@
173
	 * @param string $uid
174
	 * @return string
175
	 */
176
	protected function getDisplayName($uid) {
177
		$user = $this->userManager->get($uid);
178
		if ($user instanceof IUser) {
179
			return $user->getDisplayName();
180
		} else {
181
			return $uid;
182
		}
183
	}
184
}
185

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

@@ 259-266 (lines=8) @@
256
	 * @param string $uid
257
	 * @return string
258
	 */
259
	protected function getDisplayName($uid) {
260
		$user = $this->userManager->get($uid);
261
		if ($user instanceof IUser) {
262
			return $user->getDisplayName();
263
		} else {
264
			return $uid;
265
		}
266
	}
267
}
268