Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 914-916 (lines=3) @@
911
		}
912
913
		if ($share->getState() === $state) {
914
			if ($eventName !== '') {
915
				$this->eventDispatcher->dispatch('share.after' . $eventName, new GenericEvent(null, ['share' => $share]));
916
			}
917
			// if there are no changes in the state, just return the share as if the change was successful
918
			$node->unlock(\OCP\Lock\ILockingProvider::LOCK_SHARED);
919
			return new \OC\OCS\Result([$this->formatShare($share, true)]);
@@ 955-957 (lines=3) @@
952
953
		$this->notificationPublisher->discardNotificationForUser($share, $this->currentUser->getUID());
954
955
		if ($eventName !== '') {
956
			$this->eventDispatcher->dispatch('share.after' . $eventName, new GenericEvent(null, ['share' => $share]));
957
		}
958
		return new \OC\OCS\Result([$this->formatShare($share, true)]);
959
	}
960