Code Duplication    Length = 8-10 lines in 2 locations

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

@@ 297-306 (lines=10) @@
294
					);
295
					$this->fedShareManager->declineShare($share);
296
					break;
297
				case FileNotification::NOTIFICATION_TYPE_REQUEST_RESHARE:
298
					$shareWith = $notification['shareWith'];
299
					$share = $this->getValidShare(
300
						$providerId, $notification['sharedSecret']
301
					);
302
					// TODO: permissions not needed ???
303
					$this->fedShareManager->reShare(
304
						$share, $providerId, $shareWith, 0
305
					);
306
					break;
307
				case FileNotification::NOTIFICATION_TYPE_RESHARE_CHANGE_PERMISSION:
308
					$permissions = $notification['permission'];
309
					// TODO: Map OCM permissions to numeric
@@ 307-314 (lines=8) @@
304
						$share, $providerId, $shareWith, 0
305
					);
306
					break;
307
				case FileNotification::NOTIFICATION_TYPE_RESHARE_CHANGE_PERMISSION:
308
					$permissions = $notification['permission'];
309
					// TODO: Map OCM permissions to numeric
310
					$share = $this->getValidShare(
311
						$providerId, $notification['sharedSecret']
312
					);
313
					$this->fedShareManager->updatePermissions($share, $permissions);
314
					break;
315
				case FileNotification::NOTIFICATION_TYPE_SHARE_UNSHARED:
316
					$this->fedShareManager->unshare(
317
						$providerId, $notification['sharedSecret']