Skip to content

Commit 74c9e6b

Browse files
committed
Merge branch 'trunk' into html-api/add-html-processor
2 parents a5284d6 + d62f858 commit 74c9e6b

8 files changed

Lines changed: 6 additions & 22 deletions

src/wp-includes/class-wp-theme-json-schema.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ private static function rename_settings( &$settings, $paths_to_rename ) {
138138
*
139139
* @param array $settings Reference to the current settings array.
140140
* @param array $path Path to the property to be removed.
141-
*
142-
* @return void
143141
*/
144142
private static function unset_setting_by_path( &$settings, $path ) {
145143
$tmp_settings = &$settings; // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable

src/wp-includes/compat.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,15 @@ function array_key_last( array $array ) { // phpcs:ignore Universal.NamingConven
434434
* @since 5.9.0
435435
*
436436
* @param string $haystack The string to search in.
437-
* @param string $needle The substring to search for in the haystack.
437+
* @param string $needle The substring to search for in the `$haystack`.
438438
* @return bool True if `$needle` is in `$haystack`, otherwise false.
439439
*/
440440
function str_contains( $haystack, $needle ) {
441-
return ( '' === $needle || false !== strpos( $haystack, $needle ) );
441+
if ( '' === $needle ) {
442+
return true;
443+
}
444+
445+
return false !== strpos( $haystack, $needle );
442446
}
443447
}
444448

src/wp-includes/html-api/class-wp-html-tag-processor.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,8 +1258,6 @@ private function parse_next_attribute() {
12581258
* Move the internal cursor past any immediate successive whitespace.
12591259
*
12601260
* @since 6.2.0
1261-
*
1262-
* @return void
12631261
*/
12641262
private function skip_whitespace() {
12651263
$this->bytes_already_parsed += strspn( $this->html, " \t\f\r\n", $this->bytes_already_parsed );
@@ -1269,8 +1267,6 @@ private function skip_whitespace() {
12691267
* Applies attribute updates and cleans up once a tag is fully parsed.
12701268
*
12711269
* @since 6.2.0
1272-
*
1273-
* @return void
12741270
*/
12751271
private function after_tag() {
12761272
$this->get_updated_html();
@@ -1289,8 +1285,6 @@ private function after_tag() {
12891285
*
12901286
* @see WP_HTML_Tag_Processor::$lexical_updates
12911287
* @see WP_HTML_Tag_Processor::$classname_updates
1292-
*
1293-
* @return void
12941288
*/
12951289
private function class_name_updates_to_attributes_updates() {
12961290
if ( count( $this->classname_updates ) === 0 ) {
@@ -2183,7 +2177,6 @@ public function get_updated_html() {
21832177
* @type string|null $class_name Tag must contain this class name to match.
21842178
* @type string $tag_closers "visit" or "skip": whether to stop on tag closers, e.g. </div>.
21852179
* }
2186-
* @return void
21872180
*/
21882181
private function parse_query( $query ) {
21892182
if ( null !== $query && $query === $this->last_query ) {

src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ public function __construct() {
3434
* Registers the controllers routes.
3535
*
3636
* @since 5.9.0
37-
*
38-
* @return void
3937
*/
4038
public function register_routes() {
4139
register_rest_route(

src/wp-includes/script-loader.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3021,8 +3021,6 @@ static function () use ( $style ) {
30213021
* @type bool $optimize Whether to optimize the CSS output, e.g., combine rules. Default is `false`.
30223022
* @type bool $prettify Whether to add new lines and indents to output. Default is the test of whether the global constant `SCRIPT_DEBUG` is defined.
30233023
* }
3024-
*
3025-
* @return void
30263024
*/
30273025
function wp_enqueue_stored_styles( $options = array() ) {
30283026
$is_block_theme = wp_is_block_theme();

src/wp-includes/style-engine/class-wp-style-engine-css-rules-store.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ public static function get_stores() {
8080
* Clears all stores from static::$stores.
8181
*
8282
* @since 6.1.0
83-
*
84-
* @return void
8583
*/
8684
public static function remove_all_stores() {
8785
static::$stores = array();
@@ -93,7 +91,6 @@ public static function remove_all_stores() {
9391
* @since 6.1.0
9492
*
9593
* @param string $name The store name.
96-
* @return void
9794
*/
9895
public function set_name( $name ) {
9996
$this->name = $name;
@@ -152,7 +149,6 @@ public function add_rule( $selector ) {
152149
* @since 6.1.0
153150
*
154151
* @param string $selector The CSS selector.
155-
* @return void
156152
*/
157153
public function remove_rule( $selector ) {
158154
unset( $this->rules[ $selector ] );

src/wp-includes/style-engine/class-wp-style-engine-processor.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ public function get_css( $options = array() ) {
126126
* Combines selectors from the rules store when they have the same styles.
127127
*
128128
* @since 6.1.0
129-
*
130-
* @return void
131129
*/
132130
private function combine_rules_selectors() {
133131
// Build an array of selectors along with the JSON-ified styles to make comparisons easier.

src/wp-includes/style-engine/class-wp-style-engine.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ protected static function is_valid_style_value( $style_value ) {
288288
* @param string $store_name A valid store key.
289289
* @param string $css_selector When a selector is passed, the function will return a full CSS rule `$selector { ...rules }`, otherwise a concatenated string of properties and values.
290290
* @param string[] $css_declarations An associative array of CSS definitions, e.g., `array( "$property" => "$value", "$property" => "$value" )`.
291-
* @return void
292291
*/
293292
public static function store_css_rule( $store_name, $css_selector, $css_declarations ) {
294293
if ( empty( $store_name ) || empty( $css_selector ) || empty( $css_declarations ) ) {

0 commit comments

Comments
 (0)