Code Duplication    Length = 10-11 lines in 2 locations

lib/private/Collaboration/Collaborators/MailPlugin.php 2 locations

@@ 87-97 (lines=11) @@
84
								continue;
85
							}
86
87
							if (!$searchResult->hasResult($userType, $cloud->getUser())) {
88
								$singleResult = [[
89
									'label' => $contact['FN'] . " ($emailAddress)",
90
									'value' => [
91
										'shareType' => Share::SHARE_TYPE_USER,
92
										'shareWith' => $cloud->getUser(),
93
									],
94
								]];
95
								$searchResult->addResultSet($userType, [], $singleResult);
96
								$searchResult->markExactIdMatch($emailType);
97
							}
98
							return false;
99
						}
100
@@ 108-117 (lines=10) @@
105
								continue;
106
							}
107
108
							if (!$searchResult->hasResult($userType, $cloud->getUser())) {
109
								$singleResult = [[
110
									'label' => $contact['FN'] . " ($emailAddress)",
111
									'value' => [
112
										'shareType' => Share::SHARE_TYPE_USER,
113
										'shareWith' => $cloud->getUser(),
114
									]],
115
								];
116
								$searchResult->addResultSet($userType, $singleResult, []);
117
							}
118
						}
119
						continue;
120
					}