Make WordPress Core


Ignore:
Timestamp:
02/27/2026 11:17:12 PM (6 months ago)
Author:
westonruter
Message:

Code Quality: Replace void with null in union return types in Customizer classes.

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

Follow-up to r61766, r61719, r61716.

Props apermo, xate, mukesh27.
See #64238.
Fixes #64701.

File:
1 edited

Legend:

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

    r61670 r61767  
    857857         * @param array $keys
    858858         * @param bool  $create Default false.
    859          * @return array|void Keys are 'root', 'node', and 'key'.
     859         * @return array|null Keys are 'root', 'node', and 'key'.
    860860         */
    861861        final protected function multidimensional( &$root, $keys, $create = false ) {
     
    865865
    866866                if ( ! isset( $root ) || empty( $keys ) ) {
    867                         return;
     867                        return null;
    868868                }
    869869
     
    877877
    878878                        if ( ! is_array( $node ) || ! isset( $node[ $key ] ) ) {
    879                                 return;
     879                                return null;
    880880                        }
    881881
     
    894894
    895895                if ( ! isset( $node[ $last ] ) ) {
    896                         return;
     896                        return null;
    897897                }
    898898
Note: See TracChangeset for help on using the changeset viewer.