Code Duplication    Length = 6-6 lines in 2 locations

apps/federatedfilesharing/lib/Controller/OcmController.php 2 locations

@@ 230-235 (lines=6) @@
227
				);
228
			}
229
230
			if ($this->isSupportedResourceType($resourceType) === false) {
231
				return new JSONResponse(
232
					['message' => "ResourceType {$resourceType} is not supported"],
233
					Http::STATUS_NOT_IMPLEMENTED
234
				);
235
			}
236
237
			if (!$this->userManager->userExists($localShareWith)) {
238
				throw new InvalidShareException("User $localShareWith does not exist");
@@ 310-315 (lines=6) @@
307
				);
308
			}
309
310
			if ($this->isSupportedResourceType($resourceType) === false) {
311
				return new JSONResponse(
312
					['message' => "ResourceType {$resourceType} is not supported"],
313
					Http::STATUS_NOT_IMPLEMENTED
314
				);
315
			}
316
			// TODO: check permissions/preconditions in all cases
317
			switch ($notificationType) {
318
				case FileNotification::NOTIFICATION_TYPE_SHARE_ACCEPTED: