Trim trailing whitespace (#14721)

This commit is contained in:
Peter Kokot 2024-06-29 18:41:45 +02:00 committed by GitHub
parent 0bcc1e613b
commit c44834d8ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 30 additions and 30 deletions

View File

@ -1,7 +1,7 @@
<?php
class Foo {
public const BAR =
public const BAR =
self::BAZ
+ NonExistent::CLASS_CONSTANT;
public const BAZ = 42;

View File

@ -272,7 +272,7 @@ ZEND_API int zend_get_resource_handle(const char *module_name)
*
* The extension slot has been available since PHP 7.4 on user functions and
* has been available since PHP 8.2 on internal functions.
*
*
* # Safety
* The extension slot made available by calling this function is initialized on
* the first call made to the function in that request. If you need to
@ -280,13 +280,13 @@ ZEND_API int zend_get_resource_handle(const char *module_name)
*
* The function cache slots are not available if the function is a trampoline,
* which can be checked with something like:
*
*
* if (fbc->type == ZEND_USER_FUNCTION
* && !(fbc->op_array.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)
* ) {
* // Use ZEND_OP_ARRAY_EXTENSION somehow
* }
*/
*/
ZEND_API int zend_get_op_array_extension_handle(const char *module_name)
{
int handle = zend_op_array_extension_handles++;

View File

@ -54,7 +54,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, bool gm)
}
#ifdef ZEND_ENABLE_ZVAL_LONG64
/* Compiling for 64bit, allow years between 1970 and 2.000.000.000 */
/* Compiling for 64bit, allow years between 1970 and 2.000.000.000 */
if (gm && year < 1970) {
/* timestamps only start after 1970 */
zend_argument_value_error(1, "must be a year after 1970 (inclusive)");
@ -67,7 +67,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, bool gm)
RETURN_THROWS();
}
#else
/* Compiling for 32bit, allow years between 1970 and 2037 */
/* Compiling for 32bit, allow years between 1970 and 2037 */
if (gm && (year < 1970 || year > 2037)) {
zend_argument_value_error(1, "must be between 1970 and 2037 (inclusive)");
RETURN_THROWS();

View File

@ -122,7 +122,7 @@ static xmlDocPtr dom_doc_from_context_node(xmlNodePtr contextNode)
}
}
/* Citing from the docs (https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#xmlAddChild):
/* Citing from the docs (https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#xmlAddChild):
* "Add a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed)".
* So we must use a custom way of adding that does not merge. */
static void dom_add_child_without_merging(xmlNodePtr parent, xmlNodePtr child)

View File

@ -525,7 +525,7 @@ static void dom_import_simplexml_common(INTERNAL_FUNCTION_PARAMETERS, php_libxml
zend_argument_type_error(1, "must not be already imported as a DOMNode");
} else {
zend_argument_type_error(1, "must not be already imported as a Dom\\Node");
}
}
RETURN_THROWS();
}
@ -1882,7 +1882,7 @@ void php_dom_normalize_modern(xmlNodePtr this)
/* 3. Let data be the concatenation of the data of nodes contiguous exclusive Text nodes (excluding itself), in tree order.
* 4. Replace data with node node, offset length, count 0, and data data.
* 7. Remove nodes contiguous exclusive Text nodes (excluding itself), in tree order.
* 7. Remove nodes contiguous exclusive Text nodes (excluding itself), in tree order.
* => In other words: Concat every contiguous text node into node and delete the merged nodes. */
dom_merge_adjacent_exclusive_text_nodes(node);

View File

@ -408,7 +408,7 @@ namespace
public function compareDocumentPosition(DOMNode $other): int {}
public function __sleep(): array {}
public function __wakeup(): void {}
}
@ -446,7 +446,7 @@ namespace
/** @implementation-alias DOMNode::__sleep */
public function __sleep(): array {}
/** @implementation-alias DOMNode::__wakeup */
public function __wakeup(): void {}
}

View File

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: eda699f0d524fae5ae76a3a395438a16989c2af8 */
* Stub hash: fd650b1e64c4ed4ce66b0dad9c681a51cb8ff1ae */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 0)
ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)

View File

@ -508,7 +508,7 @@ static int dom_xml_common_text_serialization(xmlOutputBufferPtr out, const char
TRY(xmlOutputBufferWriteLit(out, "&quot;"));
break;
}
/* The following three are added to address https://github.com/w3c/DOM-Parsing/issues/59 */
case '\t': {
@ -1050,7 +1050,7 @@ static int dom_xml_serializing_a_document_fragment_node(
int indent
)
{
/* 1. Let markup the empty string.
/* 1. Let markup the empty string.
* => We use the output buffer instead. */
/* 2. For each child child of node, in tree order, run the XML serialization algorithm on the child ... */

View File

@ -470,7 +470,7 @@ if ($pid) {
fputs($fs, "file1\r\nfile1\r\nfile\nb0rk\r\n");
fputs($s, "226 Closing data Connection.\r\n");
fclose($fs);
fputs($s, "226 Transfer complete\r\n");
}elseif (preg_match('/^LIST no_exists\//', $buf, $matches)) {
fputs($s, "425 Error establishing connection\r\n");

View File

@ -151,7 +151,7 @@ void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
*(p++) = a;
}
}
if (quality >= gdWebpLossless) {
out_size = WebPEncodeLosslessRGBA(argb, gdImageSX(im), gdImageSY(im), gdImageSX(im) * 4, &out);
} else {

View File

@ -68,7 +68,7 @@ static int numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_error_handling *error_
zend_argument_value_error(1, "\"%s\" is invalid", locale);
return FAILURE;
}
/* Create an ICU number formatter. */
FORMATTER_OBJECT(nfo) = unum_open(style, spattern, spattern_len, locale, NULL, &INTL_DATA_ERROR_CODE(nfo));

View File

@ -166,7 +166,7 @@ int32_t grapheme_strpos_utf16(char *haystack, size_t haystack_len, char *needle,
if(char_pos < offset_pos) {
/* last one is beyond our start offset */
char_pos = USEARCH_DONE;
}
}
} else {
/* searching backwards is broken, so we search forwards, albeit it's less efficient */
int32_t prev_pos = USEARCH_DONE;

View File

@ -335,7 +335,7 @@ PHP_FUNCTION(json_validate)
}
JSON_G(error_code) = PHP_JSON_ERROR_NONE;
if (depth <= 0) {
zend_argument_value_error(2, "must be greater than 0");
RETURN_THROWS();

View File

@ -520,12 +520,12 @@ PHP_FUNCTION(mysqli_execute_query)
if (FAIL == mysql_stmt_prepare(stmt->stmt, query, query_len)) {
MYSQLI_REPORT_STMT_ERROR(stmt->stmt);
close_stmt_and_copy_errors(stmt, mysql);
RETURN_FALSE;
}
/* The bit below, which is copied from mysqli_prepare, is needed for bad index exceptions */
/* The bit below, which is copied from mysqli_prepare, is needed for bad index exceptions */
/* don't initialize stmt->query with NULL, we ecalloc()-ed the memory */
/* Get performance boost if reporting is switched off */
if (query_len && (MyG(report_mode) & MYSQLI_REPORT_INDEX)) {

View File

@ -72,6 +72,6 @@ PHP_METHOD(mysqli_sql_exception, getSqlState)
prop = zend_read_property(mysqli_exception_class_entry, Z_OBJ_P(ZEND_THIS), "sqlstate", sizeof("sqlstate")-1, 1, &rv);
ZVAL_DEREF(prop);
zend_string *str = zval_get_string(prop);
RETURN_STR(str);
}

View File

@ -1,6 +1,6 @@
# The mysqli extension tests
To run the tests, a test database must be created in the MySQL command-line:
To run the tests, a test database must be created in the MySQL command-line:
```sql
CREATE DATABASE test;
```
@ -36,4 +36,4 @@ MYSQL_TEST_SOCKET
## MySQL User Permissions
The MySQL user used to run the tests must have full permissions on the test database.
The MySQL user used to run the tests must have full permissions on the test database.

View File

@ -4570,7 +4570,7 @@ static struct jit_observer_fcall_is_unobserved_data jit_observer_fcall_is_unobse
ir_ref tmp = ir_LOAD_U8(ir_ADD_OFFSET(func_ref, offsetof(zend_function, type)));
ir_ref if_internal_func = ir_IF(ir_AND_U8(tmp, ir_CONST_U8(ZEND_INTERNAL_FUNCTION)));
ir_IF_TRUE(if_internal_func);
ir_ref observer_handler_internal = ir_ADD_OFFSET(run_time_cache, zend_observer_fcall_internal_function_extension * sizeof(void *));
ir_ref if_internal_func_end = ir_END();
@ -17103,7 +17103,7 @@ static ir_ref jit_frameless_observer(zend_jit_ctx *jit, const zend_op *opline) {
// Not need for runtime cache or generator checks here, we just need if_unobserved
ir_ref if_unobserved = jit_observer_fcall_is_unobserved_start(jit, fbc, &observer_handler, IR_UNUSED, IR_UNUSED).if_unobserved;
// Call zend_frameless_observed_call for the main logic.
// Call zend_frameless_observed_call for the main logic.
ir_CALL_1(IR_VOID, ir_CONST_ADDR((size_t)zend_frameless_observed_call), jit_FP(jit));
ir_ref skip = ir_END();

View File

@ -1685,7 +1685,7 @@ PHP_FUNCTION(pcntl_setcpuaffinity)
zend_argument_value_error(2, "cpu id must be between 0 and " ZEND_ULONG_FMT " (" ZEND_LONG_FMT ")", maxcpus, cpu);
RETURN_THROWS();
}
if (!PCNTL_CPU_ISSET(cpu, mask)) {
PCNTL_CPU_SET(cpu, mask);
}

View File

@ -49,7 +49,7 @@ $ gcc \
If all goes to plan you should be able to run the program.
```bash
$ ./a.out
$ ./a.out
Number of functions loaded: 1046
```

View File

@ -1,7 +1,7 @@
--TEST--
Check permissions for created errorlog file
--SKIPIF--
<?php
<?php
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
die("skip this test on windows");
}
@ -26,7 +26,7 @@ try {
printf("got permissions=%o\n", fileperms(LOG_FILENAME) & 0777);
printf("errorlog contents\n%s", file_get_contents(LOG_FILENAME));
umask($oldMask);
} finally {
unlink(LOG_FILENAME);