From c0f706fa753dcda85731804799984f476fed46f0 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Fri, 30 Aug 2024 01:00:50 +0200 Subject: [PATCH] Trim trailing whitespace [skip ci] --- docs/release-process.md | 2 +- ext/dom/parentnode/css_selectors.c | 2 +- ext/pdo_firebird/firebird_driver.c | 12 ++++++------ ext/pdo_firebird/firebird_statement.c | 12 ++++++------ ext/pdo_firebird/pdo_firebird_utils.cpp | 8 ++++---- ext/pdo_firebird/pdo_firebird_utils.h | 8 ++++---- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/release-process.md b/docs/release-process.md index cd9391e2d2c53..6c93fbdd53965 100644 --- a/docs/release-process.md +++ b/docs/release-process.md @@ -248,7 +248,7 @@ slightly different steps. We'll call attention where the steps differ. ```shell git add -p git commit --gpg-sign=YOURKEYID -m "[ci skip] Update NEWS for PHP X.Y.Z alpha2" - ``` + ``` 🔷 **For post-GA releases only,** switch back to the *version branch* for your release (e.g., `PHP-8.2`) and bump the version numbers in diff --git a/ext/dom/parentnode/css_selectors.c b/ext/dom/parentnode/css_selectors.c index ff1d07abc5321..b215dc90039cf 100644 --- a/ext/dom/parentnode/css_selectors.c +++ b/ext/dom/parentnode/css_selectors.c @@ -103,7 +103,7 @@ static lxb_css_selector_list_t *dom_parse_selector( php_dom_throw_error_with_message(SYNTAX_ERR, "Invalid selector", true); } } - + return list; } diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index 5db0c7f75aa1d..cd18e42950c4f 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -465,7 +465,7 @@ static int php_firebird_preprocess(const zend_string* sql, char* sql_out, HashTa /* set coercing a data type */ static void set_coercing_output_data_types(XSQLDA* sqlda) { - /* Data types introduced in Firebird 4.0 are difficult to process using the Firebird Legacy API. */ + /* Data types introduced in Firebird 4.0 are difficult to process using the Firebird Legacy API. */ /* These data types include DECFLOAT(16), DECFLOAT(34), INT128 (NUMERIC/DECIMAL(38, x)). */ /* In any case, at this data types can only be mapped to strings. */ /* This function allows you to ensure minimal performance of queries if they contain columns of the above types. */ @@ -477,7 +477,7 @@ static void set_coercing_output_data_types(XSQLDA* sqlda) unsigned fb_client_major_version = (fb_client_version >> 8) & 0xFF; for (i=0, var = sqlda->sqlvar; i < sqlda->sqld; i++, var++) { dtype = (var->sqltype & ~1); /* drop flag bit */ - nullable = (var->sqltype & 1); + nullable = (var->sqltype & 1); switch(dtype) { case SQL_INT128: var->sqltype = SQL_VARYING + nullable; @@ -497,7 +497,7 @@ static void set_coercing_output_data_types(XSQLDA* sqlda) case SQL_TIMESTAMP_TZ: if (fb_client_major_version < 4) { - /* If the client version is below 4.0, then it is impossible to handle time zones natively, */ + /* If the client version is below 4.0, then it is impossible to handle time zones natively, */ /* so we convert these types to a string. */ var->sqltype = SQL_VARYING + nullable; var->sqllen = 58; @@ -506,8 +506,8 @@ static void set_coercing_output_data_types(XSQLDA* sqlda) case SQL_TIME_TZ: if (fb_client_major_version < 4) { - /* If the client version is below 4.0, then it is impossible to handle time zones natively, */ - /* so we convert these types to a string. */ + /* If the client version is below 4.0, then it is impossible to handle time zones natively, */ + /* so we convert these types to a string. */ var->sqltype = SQL_VARYING + nullable; var->sqllen = 46; } @@ -516,7 +516,7 @@ static void set_coercing_output_data_types(XSQLDA* sqlda) default: break; } - } + } } #endif diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 0fbfe77668b57..ceb10339a518c 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -84,7 +84,7 @@ static int get_formatted_time_tz(pdo_stmt_t *stmt, const ISC_TIME_TZ* timeTz, zv unsigned hours = 0, minutes = 0, seconds = 0, fractions = 0; char timeZoneBuffer[40] = {0}; char *fmt; - struct tm t; + struct tm t; ISC_TIME time; char timeBuf[80] = {0}; char timeTzBuf[124] = {0}; @@ -94,7 +94,7 @@ static int get_formatted_time_tz(pdo_stmt_t *stmt, const ISC_TIME_TZ* timeTz, zv time = fb_encode_time(hours, minutes, seconds, fractions); isc_decode_sql_time(&time, &t); fmt = S->H->time_format ? S->H->time_format : PDO_FB_DEF_TIME_FMT; - + size_t len = strftime(timeBuf, sizeof(timeBuf), fmt, &t); if (len == 0) { return 1; @@ -112,7 +112,7 @@ static int get_formatted_timestamp_tz(pdo_stmt_t *stmt, const ISC_TIMESTAMP_TZ* unsigned year, month, day, hours, minutes, seconds, fractions; char timeZoneBuffer[40] = {0}; char *fmt; - struct tm t; + struct tm t; ISC_TIMESTAMP ts; char timestampBuf[80] = {0}; char timestampTzBuf[124] = {0}; @@ -124,7 +124,7 @@ static int get_formatted_timestamp_tz(pdo_stmt_t *stmt, const ISC_TIMESTAMP_TZ* isc_decode_timestamp(&ts, &t); fmt = S->H->timestamp_format ? S->H->timestamp_format : PDO_FB_DEF_TIMESTAMP_FMT; - + size_t len = strftime(timestampBuf, sizeof(timestampBuf), fmt, &t); if (len == 0) { return 1; @@ -563,7 +563,7 @@ static int pdo_firebird_stmt_get_col( size_t len = strftime(buf, sizeof(buf), fmt, &t); ZVAL_STRINGL(result, buf, len); break; -#if FB_API_VER >= 40 +#if FB_API_VER >= 40 case SQL_TIME_TZ: { ISC_TIME_TZ time = php_get_isc_time_tz_from_sqldata(var->sqldata); return get_formatted_time_tz(stmt, &time, result); @@ -572,7 +572,7 @@ static int pdo_firebird_stmt_get_col( ISC_TIMESTAMP_TZ ts = php_get_isc_timestamp_tz_from_sqldata(var->sqldata); return get_formatted_timestamp_tz(stmt, &ts, result); } -#endif +#endif case SQL_BLOB: { ISC_QUAD quad = php_get_isc_quad_from_sqldata(var->sqldata); return php_firebird_fetch_blob(stmt, colno, result, &quad); diff --git a/ext/pdo_firebird/pdo_firebird_utils.cpp b/ext/pdo_firebird/pdo_firebird_utils.cpp index e972060cefc14..ec9f1fc85778a 100644 --- a/ext/pdo_firebird/pdo_firebird_utils.cpp +++ b/ext/pdo_firebird/pdo_firebird_utils.cpp @@ -33,7 +33,7 @@ extern "C" unsigned fb_get_client_version(void) { Firebird::IMaster* master = Firebird::fb_get_master_interface(); Firebird::IUtil* util = master->getUtilInterface(); - return util->getClientVersion(); + return util->getClientVersion(); } extern "C" ISC_TIME fb_encode_time(unsigned hours, unsigned minutes, unsigned seconds, unsigned fractions) @@ -53,7 +53,7 @@ extern "C" ISC_DATE fb_encode_date(unsigned year, unsigned month, unsigned day) #if FB_API_VER >= 40 /* Decodes a time with time zone into its time components. */ -extern "C" ISC_STATUS fb_decode_time_tz(ISC_STATUS* isc_status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, +extern "C" ISC_STATUS fb_decode_time_tz(ISC_STATUS* isc_status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) { Firebird::IMaster* master = Firebird::fb_get_master_interface(); @@ -70,9 +70,9 @@ extern "C" ISC_STATUS fb_decode_time_tz(ISC_STATUS* isc_status, const ISC_TIME_T } /* Decodes a timestamp with time zone into its date and time components */ -extern "C" ISC_STATUS fb_decode_timestamp_tz(ISC_STATUS* isc_status, const ISC_TIMESTAMP_TZ* timestampTz, +extern "C" ISC_STATUS fb_decode_timestamp_tz(ISC_STATUS* isc_status, const ISC_TIMESTAMP_TZ* timestampTz, unsigned* year, unsigned* month, unsigned* day, - unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, + unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer) { Firebird::IMaster* master = Firebird::fb_get_master_interface(); diff --git a/ext/pdo_firebird/pdo_firebird_utils.h b/ext/pdo_firebird/pdo_firebird_utils.h index 29e2d802b2449..19b0d0ab4ba41 100644 --- a/ext/pdo_firebird/pdo_firebird_utils.h +++ b/ext/pdo_firebird/pdo_firebird_utils.h @@ -31,13 +31,13 @@ ISC_DATE fb_encode_date(unsigned year, unsigned month, unsigned day); #if FB_API_VER >= 40 -ISC_STATUS fb_decode_time_tz(ISC_STATUS* isc_status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, +ISC_STATUS fb_decode_time_tz(ISC_STATUS* isc_status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, unsigned timeZoneBufferLength, char* timeZoneBuffer); -ISC_STATUS fb_decode_timestamp_tz(ISC_STATUS* isc_status, const ISC_TIMESTAMP_TZ* timestampTz, +ISC_STATUS fb_decode_timestamp_tz(ISC_STATUS* isc_status, const ISC_TIMESTAMP_TZ* timestampTz, unsigned* year, unsigned* month, unsigned* day, - unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, - unsigned timeZoneBufferLength, char* timeZoneBuffer); + unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, + unsigned timeZoneBufferLength, char* timeZoneBuffer); #endif