Code Duplication    Length = 13-13 lines in 2 locations

apps/files_sharing/lib/Controller/ShareesController.php 2 locations

@@ 321-333 (lines=13) @@
318
				list(, $serverUrl) = $this->splitUserRemote($cloudId);
319
320
321
				if (strtolower($cloudId) === $lowerSearch) {
322
					$foundRemoteById = true;
323
					// Save this as an exact match and continue with next CLOUD
324
					$this->result['exact']['remotes'][] = [
325
						'label' => $contact['FN'],
326
						'value' => [
327
							'shareType' => Share::SHARE_TYPE_REMOTE,
328
							'shareWith' => $cloudId,
329
							'server' => $serverUrl,
330
						],
331
					];
332
					continue;
333
				}
334
335
				// CLOUD matching is done above
336
				unset($searchProperties['CLOUD']);
@@ 350-362 (lines=13) @@
347
					}
348
					foreach($values as $value) {
349
						// check if we have an exact match
350
						if(strtolower($value) === $lowerSearch) {
351
							$this->result['exact']['remotes'][] = [
352
								'label' => $contact['FN'],
353
								'value' => [
354
									'shareType' => Share::SHARE_TYPE_REMOTE,
355
									'shareWith' => $cloudId,
356
									'server' => $serverUrl,
357
								],
358
							];
359
360
							// Now skip to next CLOUD
361
							continue 3;
362
						}
363
					}
364
				}
365