Code Duplication    Length = 12-12 lines in 2 locations

lib/Controller/PageController.php 2 locations

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