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

@@ 162-169 (lines=8) @@
159
				'configkey',
160
			]);
161
162
			if ($inserted) {
163
				if (!isset($this->cache[$app])) {
164
					$this->cache[$app] = [];
165
				}
166
167
				$this->cache[$app][$key] = $value;
168
				return true;
169
			}
170
		}
171
172
		$sql = $this->conn->getQueryBuilder();