Code Duplication    Length = 10-11 lines in 2 locations

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

@@ 115-125 (lines=11) @@
112
								continue;
113
							}
114
115
							if (!$searchResult->hasResult($userType, $cloud->getUser())) {
116
								$singleResult = [[
117
									'label' => $contact['FN'] . " ($emailAddress)",
118
									'value' => [
119
										'shareType' => Share::SHARE_TYPE_USER,
120
										'shareWith' => $cloud->getUser(),
121
									],
122
								]];
123
								$searchResult->addResultSet($userType, [], $singleResult);
124
								$searchResult->markExactIdMatch($emailType);
125
							}
126
							return false;
127
						}
128
@@ 136-145 (lines=10) @@
133
								continue;
134
							}
135
136
							if (!$searchResult->hasResult($userType, $cloud->getUser())) {
137
								$singleResult = [[
138
									'label' => $contact['FN'] . " ($emailAddress)",
139
									'value' => [
140
										'shareType' => Share::SHARE_TYPE_USER,
141
										'shareWith' => $cloud->getUser(),
142
									]],
143
								];
144
								$searchResult->addResultSet($userType, $singleResult, []);
145
							}
146
						}
147
						continue;
148
					}