Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 255-262 (lines=8) @@
252
	 * @param IUser $user user for which to retrieve the additional info
253
	 * @return string|null additional info or null if none to be displayed
254
	 */
255
	protected function getAdditionalUserInfo(IUser $user) {
256
		if ($this->additionalInfoField === 'email') {
257
			return $user->getEMailAddress();
258
		} elseif ($this->additionalInfoField === 'id') {
259
			return $user->getUID();
260
		}
261
		return null;
262
	}
263
264
	/**
265
	 * @param string $search

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

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