Code Duplication    Length = 8-10 lines in 2 locations

lib/Service/ConfigService.php 2 locations

@@ 140-147 (lines=8) @@
137
	 *
138
	 * @return string
139
	 */
140
	public function getAppValue(string $key): string {
141
		$defaultValue = null;
142
		if (array_key_exists($key, $this->defaults)) {
143
			$defaultValue = $this->defaults[$key];
144
		}
145
146
		return (string)$this->config->getAppValue(Application::APP_NAME, $key, $defaultValue);
147
	}
148
149
	/**
150
	 * Set a value by key
@@ 188-197 (lines=10) @@
185
	 *
186
	 * @return string
187
	 */
188
	public function getUserValue(string $key): string {
189
		$defaultValue = null;
190
		if (array_key_exists($key, $this->defaults)) {
191
			$defaultValue = $this->defaults[$key];
192
		}
193
194
		return $this->config->getUserValue(
195
			$this->userId, Application::APP_NAME, $key, $defaultValue
196
		);
197
	}
198
199
200
	/**