Code Duplication    Length = 5-8 lines in 2 locations

lib/private/Config.php 1 location

@@ 133-137 (lines=5) @@
130
	 * @return bool True if the file needs to be updated, false otherwise
131
	 */
132
	protected function set($key, $value) {
133
		if (!isset($this->cache[$key]) || $this->cache[$key] !== $value) {
134
			// Add change
135
			$this->cache[$key] = $value;
136
			return true;
137
		}
138
139
		return false;
140
	}

lib/private/AppConfig.php 1 location

@@ 176-183 (lines=8) @@
173
				'configkey',
174
			]);
175
176
			if ($inserted) {
177
				if (!isset($this->cache[$app])) {
178
					$this->cache[$app] = [];
179
				}
180
181
				$this->cache[$app][$key] = $value;
182
				return true;
183
			}
184
		}
185
186
		$sql = $this->conn->getQueryBuilder();