Code Duplication    Length = 16-16 lines in 2 locations

controller/settingscontroller.php 2 locations

@@ 133-148 (lines=16) @@
130
	 *
131
	 * @return JSONResponse
132
	 */
133
	private function getView() {
134
		try {
135
			$view = $this->config->getUserValue(
136
				$this->userId,
137
				$this->appName,
138
				'currentView',
139
				'month'
140
			);
141
		} catch(\Exception $e) {
142
			return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
143
		}
144
145
		return new JSONResponse([
146
			'value' => $view,
147
		]);
148
	}
149
150
	/**
151
	 * check if view is allowed
@@ 196-211 (lines=16) @@
193
	 *
194
	 * @return JSONResponse
195
	 */
196
	private function getSkipPopover() {
197
		try {
198
			$view = $this->config->getUserValue(
199
				$this->userId,
200
				$this->appName,
201
				'skipPopover',
202
				'no'
203
			);
204
		} catch(\Exception $e) {
205
			return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
206
		}
207
208
		return new JSONResponse([
209
			'value' => $view,
210
		]);
211
	}
212
213
	/**
214
	 * check if value for skipPopover is allowed