Code Duplication    Length = 3-3 lines in 2 locations

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

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