Code Duplication    Length = 6-6 lines in 3 locations

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

@@ 321-326 (lines=6) @@
318
			}
319
			// TODO: check permissions/preconditions in all cases
320
			switch ($notificationType) {
321
				case FileNotification::NOTIFICATION_TYPE_SHARE_ACCEPTED:
322
					$share = $this->ocmMiddleware->getValidShare(
323
						$providerId, $notification['sharedSecret']
324
					);
325
					$this->fedShareManager->acceptShare($share);
326
					break;
327
				case FileNotification::NOTIFICATION_TYPE_SHARE_DECLINED:
328
					$share = $this->ocmMiddleware->getValidShare(
329
						$providerId, $notification['sharedSecret']
@@ 327-332 (lines=6) @@
324
					);
325
					$this->fedShareManager->acceptShare($share);
326
					break;
327
				case FileNotification::NOTIFICATION_TYPE_SHARE_DECLINED:
328
					$share = $this->ocmMiddleware->getValidShare(
329
						$providerId, $notification['sharedSecret']
330
					);
331
					$this->fedShareManager->declineShare($share);
332
					break;
333
				case FileNotification::NOTIFICATION_TYPE_REQUEST_RESHARE:
334
					$shareWithAddress = new Address($notification['shareWith']);
335
					$localShareWith = $shareWithAddress->getUserId();
@@ 364-369 (lines=6) @@
361
						$providerId, $notification['sharedSecret']
362
					);
363
					break;
364
				case FileNotification::NOTIFICATION_TYPE_RESHARE_UNDO:
365
					$share = $this->ocmMiddleware->getValidShare(
366
						$providerId, $notification['sharedSecret']
367
					);
368
					$this->fedShareManager->revoke($share);
369
					break;
370
				default:
371
					return new JSONResponse(
372
						['message' => "Notification of type {$notificationType} is not supported"],