Make WordPress Core


Ignore:
Timestamp:
12/22/2025 08:43:17 PM (6 months ago)
Author:
westonruter
Message:

Docs: Improve specificity of PHP types in functions.wp-scripts.php and functions.wp-styles.php.

These files now adhere to PHPStan level 8.

Developed in https://github.com/WordPress/wordpress-develop/pull/10652

Follow-up to [61362], [61358].

See #64238.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.wp-styles.php

    r60948 r61402  
    3939 * @global WP_Styles $wp_styles The WP_Styles object for printing styles.
    4040 *
    41  * @param string|bool|array $handles Styles to be printed. Default 'false'.
     41 * @param string|false|string[] $handles Styles to be printed. Default 'false'.
    4242 * @return string[] On success, an array of handles of processed WP_Dependencies items; otherwise, an empty array.
    4343 */
     
    9999            '3.7.0'
    100100        );
    101         $data = trim( preg_replace( '#<style[^>]*>(.*)</style>#is', '$1', $data ) );
     101        $data = trim( (string) preg_replace( '#<style[^>]*>(.*)</style>#is', '$1', $data ) );
    102102    }
    103103
Note: See TracChangeset for help on using the changeset viewer.