Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 262-269 (lines=8) @@
259
	 * @param IUser $user user for which to retrieve the additional info
260
	 * @return string|null additional info or null if none to be displayed
261
	 */
262
	protected function getAdditionalUserInfo(IUser $user) {
263
		if ($this->additionalInfoField === 'email') {
264
			return $user->getEMailAddress();
265
		} elseif ($this->additionalInfoField === 'id') {
266
			return $user->getUID();
267
		}
268
		return null;
269
	}
270
271
	/**
272
	 * @param string $search

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

@@ 119-126 (lines=8) @@
116
	 * @param IUser $user user for which to retrieve the additional info
117
	 * @return string|null additional info or null if none to be displayed
118
	 */
119
	private function getAdditionalUserInfo(IUser $user) {
120
		if ($this->additionalInfoField === 'email') {
121
			return $user->getEMailAddress();
122
		} elseif ($this->additionalInfoField === 'id') {
123
			return $user->getUID();
124
		}
125
		return null;
126
	}
127
128
	/**
129
	 * Convert an IShare to an array for OCS output