Code Duplication    Length = 6-6 lines in 3 locations

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

@@ 318-323 (lines=6) @@
315
			}
316
			// TODO: check permissions/preconditions in all cases
317
			switch ($notificationType) {
318
				case FileNotification::NOTIFICATION_TYPE_SHARE_ACCEPTED:
319
					$share = $this->getValidShare(
320
						$providerId, $notification['sharedSecret']
321
					);
322
					$this->fedShareManager->acceptShare($share);
323
					break;
324
				case FileNotification::NOTIFICATION_TYPE_SHARE_DECLINED:
325
					$share = $this->getValidShare(
326
						$providerId, $notification['sharedSecret']
@@ 324-329 (lines=6) @@
321
					);
322
					$this->fedShareManager->acceptShare($share);
323
					break;
324
				case FileNotification::NOTIFICATION_TYPE_SHARE_DECLINED:
325
					$share = $this->getValidShare(
326
						$providerId, $notification['sharedSecret']
327
					);
328
					$this->fedShareManager->declineShare($share);
329
					break;
330
				case FileNotification::NOTIFICATION_TYPE_REQUEST_RESHARE:
331
					$shareWithAddress = new Address($notification['shareWith']);
332
					$localShareWith = $shareWithAddress->getUserId();
@@ 354-359 (lines=6) @@
351
						$providerId, $notification['sharedSecret']
352
					);
353
					break;
354
				case FileNotification::NOTIFICATION_TYPE_RESHARE_UNDO:
355
					$share = $this->getValidShare(
356
						$providerId, $notification['sharedSecret']
357
					);
358
					$this->fedShareManager->revoke($share);
359
					break;
360
				default:
361
					return new JSONResponse(
362
						['message' => "Notification of type {$notificationType} is not supported"],