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
	public 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

@@ 242-252 (lines=11) @@
239
		parent::reportQueryError( $error, $errno, $sql, $fname, false );
240
	}
241
242
	public function freeResult( $res ) {
243
		if ( $res instanceof ResultWrapper ) {
244
			$res = $res->result;
245
		}
246
		MediaWiki\suppressWarnings();
247
		$ok = pg_free_result( $res );
248
		MediaWiki\restoreWarnings();
249
		if ( !$ok ) {
250
			throw new DBUnexpectedError( $this, "Unable to free Postgres result\n" );
251
		}
252
	}
253
254
	public function fetchObject( $res ) {
255
		if ( $res instanceof ResultWrapper ) {