Skip to content

Commit c44834d

Browse files
authored
Trim trailing whitespace (#14721)
1 parent 0bcc1e6 commit c44834d

20 files changed

+30
-30
lines changed

Zend/tests/gh7771_2_definition.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
class Foo {
4-
public const BAR =
4+
public const BAR =
55
self::BAZ
66
+ NonExistent::CLASS_CONSTANT;
77
public const BAZ = 42;

Zend/zend_extensions.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,21 +272,21 @@ ZEND_API int zend_get_resource_handle(const char *module_name)
272272
*
273273
* The extension slot has been available since PHP 7.4 on user functions and
274274
* has been available since PHP 8.2 on internal functions.
275-
*
275+
*
276276
* # Safety
277277
* The extension slot made available by calling this function is initialized on
278278
* the first call made to the function in that request. If you need to
279279
* initialize it before this point, call `zend_init_func_run_time_cache`.
280280
*
281281
* The function cache slots are not available if the function is a trampoline,
282282
* which can be checked with something like:
283-
*
283+
*
284284
* if (fbc->type == ZEND_USER_FUNCTION
285285
* && !(fbc->op_array.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)
286286
* ) {
287287
* // Use ZEND_OP_ARRAY_EXTENSION somehow
288288
* }
289-
*/
289+
*/
290290
ZEND_API int zend_get_op_array_extension_handle(const char *module_name)
291291
{
292292
int handle = zend_op_array_extension_handles++;

ext/calendar/easter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, bool gm)
5454
}
5555

5656
#ifdef ZEND_ENABLE_ZVAL_LONG64
57-
/* Compiling for 64bit, allow years between 1970 and 2.000.000.000 */
57+
/* Compiling for 64bit, allow years between 1970 and 2.000.000.000 */
5858
if (gm && year < 1970) {
5959
/* timestamps only start after 1970 */
6060
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)
6767
RETURN_THROWS();
6868
}
6969
#else
70-
/* Compiling for 32bit, allow years between 1970 and 2037 */
70+
/* Compiling for 32bit, allow years between 1970 and 2037 */
7171
if (gm && (year < 1970 || year > 2037)) {
7272
zend_argument_value_error(1, "must be between 1970 and 2037 (inclusive)");
7373
RETURN_THROWS();

ext/dom/parentnode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static xmlDocPtr dom_doc_from_context_node(xmlNodePtr contextNode)
122122
}
123123
}
124124

125-
/* Citing from the docs (https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#xmlAddChild):
125+
/* Citing from the docs (https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#xmlAddChild):
126126
* "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)".
127127
* So we must use a custom way of adding that does not merge. */
128128
static void dom_add_child_without_merging(xmlNodePtr parent, xmlNodePtr child)

ext/dom/php_dom.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ static void dom_import_simplexml_common(INTERNAL_FUNCTION_PARAMETERS, php_libxml
525525
zend_argument_type_error(1, "must not be already imported as a DOMNode");
526526
} else {
527527
zend_argument_type_error(1, "must not be already imported as a Dom\\Node");
528-
}
528+
}
529529
RETURN_THROWS();
530530
}
531531

@@ -1882,7 +1882,7 @@ void php_dom_normalize_modern(xmlNodePtr this)
18821882

18831883
/* 3. Let data be the concatenation of the data of node’s contiguous exclusive Text nodes (excluding itself), in tree order.
18841884
* 4. Replace data with node node, offset length, count 0, and data data.
1885-
* 7. Remove node’s contiguous exclusive Text nodes (excluding itself), in tree order.
1885+
* 7. Remove node’s contiguous exclusive Text nodes (excluding itself), in tree order.
18861886
* => In other words: Concat every contiguous text node into node and delete the merged nodes. */
18871887
dom_merge_adjacent_exclusive_text_nodes(node);
18881888

ext/dom/php_dom.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ public function getRootNode(?array $options = null): DOMNode {}
408408
public function compareDocumentPosition(DOMNode $other): int {}
409409

410410
public function __sleep(): array {}
411-
411+
412412
public function __wakeup(): void {}
413413
}
414414

@@ -446,7 +446,7 @@ class DOMNameSpaceNode
446446

447447
/** @implementation-alias DOMNode::__sleep */
448448
public function __sleep(): array {}
449-
449+
450450
/** @implementation-alias DOMNode::__wakeup */
451451
public function __wakeup(): void {}
452452
}

ext/dom/php_dom_arginfo.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/dom/xml_serializer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ static int dom_xml_common_text_serialization(xmlOutputBufferPtr out, const char
508508
TRY(xmlOutputBufferWriteLit(out, "&quot;"));
509509
break;
510510
}
511-
511+
512512
/* The following three are added to address https://github.com/w3c/DOM-Parsing/issues/59 */
513513

514514
case '\t': {
@@ -1050,7 +1050,7 @@ static int dom_xml_serializing_a_document_fragment_node(
10501050
int indent
10511051
)
10521052
{
1053-
/* 1. Let markup the empty string.
1053+
/* 1. Let markup the empty string.
10541054
* => We use the output buffer instead. */
10551055

10561056
/* 2. For each child child of node, in tree order, run the XML serialization algorithm on the child ... */

ext/ftp/tests/server.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ if ($pid) {
470470
fputs($fs, "file1\r\nfile1\r\nfile\nb0rk\r\n");
471471
fputs($s, "226 Closing data Connection.\r\n");
472472
fclose($fs);
473-
473+
474474
fputs($s, "226 Transfer complete\r\n");
475475
}elseif (preg_match('/^LIST no_exists\//', $buf, $matches)) {
476476
fputs($s, "425 Error establishing connection\r\n");

ext/gd/libgd/gd_webp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
151151
*(p++) = a;
152152
}
153153
}
154-
154+
155155
if (quality >= gdWebpLossless) {
156156
out_size = WebPEncodeLosslessRGBA(argb, gdImageSX(im), gdImageSY(im), gdImageSX(im) * 4, &out);
157157
} else {

ext/intl/formatter/formatter_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static int numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_error_handling *error_
6868
zend_argument_value_error(1, "\"%s\" is invalid", locale);
6969
return FAILURE;
7070
}
71-
71+
7272
/* Create an ICU number formatter. */
7373
FORMATTER_OBJECT(nfo) = unum_open(style, spattern, spattern_len, locale, NULL, &INTL_DATA_ERROR_CODE(nfo));
7474

ext/intl/grapheme/grapheme_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ int32_t grapheme_strpos_utf16(char *haystack, size_t haystack_len, char *needle,
166166
if(char_pos < offset_pos) {
167167
/* last one is beyond our start offset */
168168
char_pos = USEARCH_DONE;
169-
}
169+
}
170170
} else {
171171
/* searching backwards is broken, so we search forwards, albeit it's less efficient */
172172
int32_t prev_pos = USEARCH_DONE;

ext/json/json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ PHP_FUNCTION(json_validate)
335335
}
336336

337337
JSON_G(error_code) = PHP_JSON_ERROR_NONE;
338-
338+
339339
if (depth <= 0) {
340340
zend_argument_value_error(2, "must be greater than 0");
341341
RETURN_THROWS();

ext/mysqli/mysqli_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,12 +520,12 @@ PHP_FUNCTION(mysqli_execute_query)
520520

521521
if (FAIL == mysql_stmt_prepare(stmt->stmt, query, query_len)) {
522522
MYSQLI_REPORT_STMT_ERROR(stmt->stmt);
523-
523+
524524
close_stmt_and_copy_errors(stmt, mysql);
525525
RETURN_FALSE;
526526
}
527527

528-
/* The bit below, which is copied from mysqli_prepare, is needed for bad index exceptions */
528+
/* The bit below, which is copied from mysqli_prepare, is needed for bad index exceptions */
529529
/* don't initialize stmt->query with NULL, we ecalloc()-ed the memory */
530530
/* Get performance boost if reporting is switched off */
531531
if (query_len && (MyG(report_mode) & MYSQLI_REPORT_INDEX)) {

ext/mysqli/mysqli_exception.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ PHP_METHOD(mysqli_sql_exception, getSqlState)
7272
prop = zend_read_property(mysqli_exception_class_entry, Z_OBJ_P(ZEND_THIS), "sqlstate", sizeof("sqlstate")-1, 1, &rv);
7373
ZVAL_DEREF(prop);
7474
zend_string *str = zval_get_string(prop);
75-
75+
7676
RETURN_STR(str);
7777
}

ext/mysqli/tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The mysqli extension tests
22

3-
To run the tests, a test database must be created in the MySQL command-line:
3+
To run the tests, a test database must be created in the MySQL command-line:
44
```sql
55
CREATE DATABASE test;
66
```
@@ -36,4 +36,4 @@ MYSQL_TEST_SOCKET
3636

3737
## MySQL User Permissions
3838

39-
The MySQL user used to run the tests must have full permissions on the test database.
39+
The MySQL user used to run the tests must have full permissions on the test database.

ext/opcache/jit/zend_jit_ir.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4570,7 +4570,7 @@ static struct jit_observer_fcall_is_unobserved_data jit_observer_fcall_is_unobse
45704570
ir_ref tmp = ir_LOAD_U8(ir_ADD_OFFSET(func_ref, offsetof(zend_function, type)));
45714571
ir_ref if_internal_func = ir_IF(ir_AND_U8(tmp, ir_CONST_U8(ZEND_INTERNAL_FUNCTION)));
45724572
ir_IF_TRUE(if_internal_func);
4573-
4573+
45744574
ir_ref observer_handler_internal = ir_ADD_OFFSET(run_time_cache, zend_observer_fcall_internal_function_extension * sizeof(void *));
45754575

45764576
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) {
1710317103
// Not need for runtime cache or generator checks here, we just need if_unobserved
1710417104
ir_ref if_unobserved = jit_observer_fcall_is_unobserved_start(jit, fbc, &observer_handler, IR_UNUSED, IR_UNUSED).if_unobserved;
1710517105

17106-
// Call zend_frameless_observed_call for the main logic.
17106+
// Call zend_frameless_observed_call for the main logic.
1710717107
ir_CALL_1(IR_VOID, ir_CONST_ADDR((size_t)zend_frameless_observed_call), jit_FP(jit));
1710817108

1710917109
ir_ref skip = ir_END();

ext/pcntl/pcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@ PHP_FUNCTION(pcntl_setcpuaffinity)
16851685
zend_argument_value_error(2, "cpu id must be between 0 and " ZEND_ULONG_FMT " (" ZEND_LONG_FMT ")", maxcpus, cpu);
16861686
RETURN_THROWS();
16871687
}
1688-
1688+
16891689
if (!PCNTL_CPU_ISSET(cpu, mask)) {
16901690
PCNTL_CPU_SET(cpu, mask);
16911691
}

sapi/embed/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ $ gcc \
4949
If all goes to plan you should be able to run the program.
5050

5151
```bash
52-
$ ./a.out
52+
$ ./a.out
5353
Number of functions loaded: 1046
5454
```
5555

tests/basic/errorlog_permission.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
Check permissions for created errorlog file
33
--SKIPIF--
4-
<?php
4+
<?php
55
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
66
die("skip this test on windows");
77
}
@@ -26,7 +26,7 @@ try {
2626

2727
printf("got permissions=%o\n", fileperms(LOG_FILENAME) & 0777);
2828
printf("errorlog contents\n%s", file_get_contents(LOG_FILENAME));
29-
29+
3030
umask($oldMask);
3131
} finally {
3232
unlink(LOG_FILENAME);

0 commit comments

Comments
 (0)