Code Duplication    Length = 12-13 lines in 2 locations

lib/Controller/SettingsController.php 2 locations

@@ 257-269 (lines=13) @@
254
	 *
255
	 * @return DataResponse
256
	 */
257
	public function removeCustomTemplate($template) {
258
259
		$custom = $this->templatesService->getTemplatesList(true);
260
261
		$k = array_search($template, $custom);
262
		if ($k !== false) {
263
			unset($custom[$k]);
264
		}
265
266
		$this->configService->setAppValue(ConfigService::CUSTOM_TEMPLATES, json_encode($custom));
267
268
		return $this->getSettingsAdmin();
269
	}
270
271
272
	/**
@@ 291-302 (lines=12) @@
288
	 *
289
	 * @return DataResponse
290
	 */
291
	public function removeCustomTheme($theme) {
292
293
		$custom = $this->themesService->getThemesList(true);
294
295
		$k = array_search($theme, $custom);
296
		if ($k !== false) {
297
			unset($custom[$k]);
298
		}
299
300
		$this->configService->setAppValue(ConfigService::CUSTOM_THEMES, json_encode($custom));
301
302
		return $this->getSettingsAdmin();
303
	}
304
305
}