Code Duplication    Length = 6-6 lines in 3 locations

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

@@ 311-316 (lines=6) @@
308
			}
309
			// TODO: check permissions/preconditions in all cases
310
			switch ($notificationType) {
311
				case FileNotification::NOTIFICATION_TYPE_SHARE_ACCEPTED:
312
					$share = $this->getValidShare(
313
						$providerId, $notification['sharedSecret']
314
					);
315
					$this->fedShareManager->acceptShare($share);
316
					break;
317
				case FileNotification::NOTIFICATION_TYPE_SHARE_DECLINED:
318
					$share = $this->getValidShare(
319
						$providerId, $notification['sharedSecret']
@@ 317-322 (lines=6) @@
314
					);
315
					$this->fedShareManager->acceptShare($share);
316
					break;
317
				case FileNotification::NOTIFICATION_TYPE_SHARE_DECLINED:
318
					$share = $this->getValidShare(
319
						$providerId, $notification['sharedSecret']
320
					);
321
					$this->fedShareManager->declineShare($share);
322
					break;
323
				case FileNotification::NOTIFICATION_TYPE_REQUEST_RESHARE:
324
					$shareWithAddress = new Address($notification['shareWith']);
325
					$localShareWith = $shareWithAddress->getUserId();
@@ 347-352 (lines=6) @@
344
						$providerId, $notification['sharedSecret']
345
					);
346
					break;
347
				case FileNotification::NOTIFICATION_TYPE_RESHARE_UNDO:
348
					$share = $this->getValidShare(
349
						$providerId, $notification['sharedSecret']
350
					);
351
					$this->fedShareManager->revoke($share);
352
					break;
353
				default:
354
					return new JSONResponse(
355
						['message' => "Notification of type {$notificationType} is not supported"],