Code Duplication    Length = 4-4 lines in 3 locations

lib/private/Share20/Manager.php 3 locations

@@ 253-256 (lines=4) @@
250
		}
251
252
		// Cannot share with yourself
253
		if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER &&
254
			$share->getSharedWith() === $share->getSharedBy()) {
255
			throw new \InvalidArgumentException('Can’t share with yourself');
256
		}
257
258
		// The path should be set
259
		if ($share->getNode() === null) {
@@ 650-653 (lines=4) @@
647
		}
648
649
		// Cannot share with the owner
650
		if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER &&
651
			$share->getSharedWith() === $share->getShareOwner()) {
652
			throw new \InvalidArgumentException('Can’t share with the share owner');
653
		}
654
655
		// Generate the target
656
		$target = $this->config->getSystemValue('share_folder', '/') .'/'. $share->getNode()->getName();
@@ 808-811 (lines=4) @@
805
		}
806
807
		// Cannot share with the owner
808
		if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER &&
809
			$share->getSharedWith() === $share->getShareOwner()) {
810
			throw new \InvalidArgumentException('Can’t share with the share owner');
811
		}
812
813
		$this->generalCreateChecks($share);
814