Code Duplication    Length = 16-17 lines in 2 locations

apps/federatedfilesharing/lib/Controller/RequestHandlerController.php 2 locations

@@ 261-276 (lines=16) @@
258
	 *
259
	 * @return Result
260
	 */
261
	public function acceptShare($id) {
262
		try {
263
			$this->assertOutgoingSharingEnabled();
264
			$share = $this->getValidShare($id);
265
			$this->fedShareManager->acceptShare($share);
266
		} catch (NotSupportedException $e) {
267
			return new Result(
268
				null,
269
				Http::STATUS_SERVICE_UNAVAILABLE,
270
				'Server does not support federated cloud sharing'
271
			);
272
		} catch (Share\Exceptions\ShareNotFound $e) {
273
			// pass
274
		}
275
		return new Result();
276
	}
277
278
	/**
279
	 * @NoCSRFRequired
@@ 288-304 (lines=17) @@
285
	 *
286
	 * @return Result
287
	 */
288
	public function declineShare($id) {
289
		try {
290
			$this->assertOutgoingSharingEnabled();
291
			$share = $this->getValidShare($id);
292
			$this->fedShareManager->declineShare($share);
293
		} catch (NotSupportedException $e) {
294
			return new Result(
295
				null,
296
				Http::STATUS_SERVICE_UNAVAILABLE,
297
				'Server does not support federated cloud sharing'
298
			);
299
		} catch (Share\Exceptions\ShareNotFound $e) {
300
			// pass
301
		}
302
303
		return new Result();
304
	}
305
306
	/**
307
	 * @NoCSRFRequired