Code Duplication    Length = 6-6 lines in 3 locations

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

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