Code Duplication    Length = 7-12 lines in 2 locations

apps/federation/lib/DbHandler.php 1 location

@@ 103-109 (lines=7) @@
100
	 *
101
	 * @param int $id
102
	 */
103
	public function removeServer($id) {
104
		$query = $this->connection->getQueryBuilder();
105
		$query->delete($this->dbTable)
106
			->where($query->expr()->eq('id', $query->createParameter('id')))
107
			->setParameter('id', $id);
108
		$query->execute();
109
	}
110
111
	/**
112
	 * get trusted server with given ID

lib/private/AppConfig.php 1 location

@@ 245-256 (lines=12) @@
242
	 *
243
	 * Removes all keys in appconfig belonging to the app.
244
	 */
245
	public function deleteApp($app) {
246
		$this->loadConfigValues();
247
248
		$sql = $this->conn->getQueryBuilder();
249
		$sql->delete('appconfig')
250
			->where($sql->expr()->eq('appid', $sql->createParameter('app')))
251
			->setParameter('app', $app);
252
		$sql->execute();
253
254
		unset($this->cache[$app]);
255
		return false;
256
	}
257
258
	/**
259
	 * get multiple values, either the app or key can be used as wildcard by setting it to false