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

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