Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 907-909 (lines=3) @@
904
		}
905
906
		if ($share->getState() === $state) {
907
			if ($eventName !== '') {
908
				$this->eventDispatcher->dispatch('share.after' . $eventName, new GenericEvent(null, ['share' => $share]));
909
			}
910
			// if there are no changes in the state, just return the share as if the change was successful
911
			$node->unlock(\OCP\Lock\ILockingProvider::LOCK_SHARED);
912
			return new \OC\OCS\Result([$this->formatShare($share, true)]);
@@ 948-950 (lines=3) @@
945
946
		$this->notificationPublisher->discardNotificationForUser($share, $this->currentUser->getUID());
947
948
		if ($eventName !== '') {
949
			$this->eventDispatcher->dispatch('share.after' . $eventName, new GenericEvent(null, ['share' => $share]));
950
		}
951
		return new \OC\OCS\Result([$this->formatShare($share, true)]);
952
	}
953