Code Duplication    Length = 12-12 lines in 2 locations

lib/Controller/PageController.php 2 locations

@@ 185-196 (lines=12) @@
182
	 * @param int $id
183
	 * @return Response
184
	 */
185
	public function delete($id): Response {
186
		if (!$this->manager->checkIsAdmin()) {
187
			return new JSONResponse(
188
				['message' => 'Logged in user must be an admin'],
189
				Http::STATUS_FORBIDDEN
190
			);
191
		}
192
193
		$this->manager->delete($id);
194
195
		return new Response();
196
	}
197
198
	/**
199
	 * @NoAdminRequired
@@ 204-215 (lines=12) @@
201
	 * @param int $id
202
	 * @return Response
203
	 */
204
	public function removeNotifications($id): Response {
205
		if (!$this->manager->checkIsAdmin()) {
206
			return new JSONResponse(
207
				['message' => 'Logged in user must be an admin'],
208
				Http::STATUS_FORBIDDEN
209
			);
210
		}
211
212
		$this->manager->removeNotifications($id);
213
214
		return new Response();
215
	}
216
217
	/**
218
	 * @NoAdminRequired