Code Duplication    Length = 11-11 lines in 2 locations

includes/libs/rdbms/database/DatabaseMysqlBase.php 1 location

@@ 240-250 (lines=11) @@
237
	 * @param ResultWrapper|resource $res
238
	 * @throws DBUnexpectedError
239
	 */
240
	function freeResult( $res ) {
241
		if ( $res instanceof ResultWrapper ) {
242
			$res = $res->result;
243
		}
244
		MediaWiki\suppressWarnings();
245
		$ok = $this->mysqlFreeResult( $res );
246
		MediaWiki\restoreWarnings();
247
		if ( !$ok ) {
248
			throw new DBUnexpectedError( $this, "Unable to free MySQL result" );
249
		}
250
	}
251
252
	/**
253
	 * Free result memory

includes/libs/rdbms/database/DatabasePostgres.php 1 location

@@ 256-266 (lines=11) @@
253
	 * @param stdClass|ResultWrapper $res
254
	 * @throws DBUnexpectedError
255
	 */
256
	function freeResult( $res ) {
257
		if ( $res instanceof ResultWrapper ) {
258
			$res = $res->result;
259
		}
260
		MediaWiki\suppressWarnings();
261
		$ok = pg_free_result( $res );
262
		MediaWiki\restoreWarnings();
263
		if ( !$ok ) {
264
			throw new DBUnexpectedError( $this, "Unable to free Postgres result\n" );
265
		}
266
	}
267
268
	/**
269
	 * @param ResultWrapper|stdClass $res