Code Duplication    Length = 8-10 lines in 2 locations

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

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