Code Duplication    Length = 3-3 lines in 2 locations

apps/files_sharing/lib/Controller/Share20OcsController.php 2 locations

@@ 988-990 (lines=3) @@
985
		}
986
987
		if ($share->getState() === $state) {
988
			if ($eventName !== '') {
989
				$this->eventDispatcher->dispatch('share.after' . $eventName, new GenericEvent(null, ['share' => $share]));
990
			}
991
			// if there are no changes in the state, just return the share as if the change was successful
992
			$node->unlock(\OCP\Lock\ILockingProvider::LOCK_SHARED);
993
			return new Result([$this->formatShare($share, true)]);
@@ 1029-1031 (lines=3) @@
1026
1027
		$this->notificationPublisher->discardNotificationForUser($share, $this->currentUser->getUID());
1028
1029
		if ($eventName !== '') {
1030
			$this->eventDispatcher->dispatch('share.after' . $eventName, new GenericEvent(null, ['share' => $share]));
1031
		}
1032
		return new Result([$this->formatShare($share, true)]);
1033
	}
1034