Make WordPress Core


Ignore:
Timestamp:
12/07/2025 04:14:08 AM (3 months ago)
Author:
westonruter
Message:

Docs: Improve accuracy for types in phpdoc for WP_Dependencies, _WP_Dependency, WP_Scripts, and WP_Styles.

This increases these classes to PHPStan level 8.

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

See #64238.

File:
1 edited

Legend:

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

    r61357 r61358  
    9797     *
    9898     * @since 2.8.0
    99      * @var array
     99     * @var string[]|null
    100100     */
    101101    public $default_dirs;
     
    184184
    185185        if ( $this->do_concat ) {
    186             if ( $this->in_default_dir( $src ) && ! isset( $obj->extra['alt'] ) ) {
     186            if ( is_string( $src ) && $this->in_default_dir( $src ) && ! isset( $obj->extra['alt'] ) ) {
    187187                $this->concat         .= "$handle,";
    188188                $this->concat_version .= "$handle$ver";
Note: See TracChangeset for help on using the changeset viewer.