Code Duplication    Length = 14-14 lines in 2 locations

engine/classes/Elgg/Database.php 2 locations

@@ 207-220 (lines=14) @@
204
	 *                   defined, 0 if not, and false on failure.
205
	 * @throws \DatabaseException
206
	 */
207
	public function insertData($query) {
208
209
		$this->logger->log("DB query $query", \Elgg\Logger::INFO);
210
211
		$dblink = $this->getLink('write');
212
213
		$this->invalidateQueryCache();
214
215
		if ($this->executeQuery("$query", $dblink)) {
216
			return mysql_insert_id($dblink);
217
		}
218
219
		return false;
220
	}
221
222
	/**
223
	 * Update the database.
@@ 262-275 (lines=14) @@
259
	 * @return int|false The number of affected rows or false on failure
260
	 * @throws \DatabaseException
261
	 */
262
	public function deleteData($query) {
263
264
		$this->logger->log("DB query $query", \Elgg\Logger::INFO);
265
266
		$dblink = $this->getLink('write');
267
268
		$this->invalidateQueryCache();
269
270
		if ($this->executeQuery("$query", $dblink)) {
271
			return mysql_affected_rows($dblink);
272
		}
273
274
		return false;
275
	}
276
277
	/**
278
	 * Get a string that uniquely identifies a callback during the current request.