Code Duplication    Length = 4-4 lines in 2 locations

lib/private/Share20/Manager.php 2 locations

@@ 236-239 (lines=4) @@
233
		}
234
235
		// Check if we actually have share permissions
236
		if (!$share->getNode()->isShareable()) {
237
			$message_t = $this->l->t('You are not allowed to share %s', [$share->getNode()->getPath()]);
238
			throw new GenericShareException($message_t, $message_t, 404);
239
		}
240
241
		// Permissions should be set
242
		if ($share->getPermissions() === null) {
@@ 258-261 (lines=4) @@
255
		}
256
257
		// Check that we do not share with more permissions than we have
258
		if ($share->getPermissions() & ~$permissions) {
259
			$message_t = $this->l->t('Cannot increase permissions of %s', [$share->getNode()->getPath()]);
260
			throw new GenericShareException($message_t, $message_t, 404);
261
		}
262
263
264
		// Check that read permissions are always set