Make WordPress Core


Ignore:
Timestamp:
01/03/2026 06:15:57 AM (9 months ago)
Author:
westonruter
Message:

Code Modernization: Update tests to use null coalescing operator in place of isset() in ternaries.

Developed as a subset of ​https://github.com/WordPress/wordpress-develop/pull/10654

Follow-up to [61404], [61403].

See #58874, #63430.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-post-meta-fields.php

    r59023 r61424  
    2222                );
    2323
    24                 self::$wp_meta_keys_saved = isset( $GLOBALS['wp_meta_keys'] ) ? $GLOBALS['wp_meta_keys'] : array();
     24                self::$wp_meta_keys_saved = $GLOBALS['wp_meta_keys'] ?? array();
    2525                self::$post_id            = $factory->post->create();
    2626                self::$cpt_post_id        = $factory->post->create( array( 'post_type' => 'cpt' ) );
Note: See TracChangeset for help on using the changeset viewer.