Make WordPress Core


Ignore:
Timestamp:
01/03/2026 06:15:57 AM (5 weeks 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-pattern-directory-controller.php

    r60729 r61424  
    8383    public function assertPatternMatchesSchema( $pattern ) {
    8484        $schema     = static::$controller->get_item_schema();
    85         $pattern_id = isset( $pattern->id ) ? $pattern->id : '{pattern ID is missing}';
     85        $pattern_id = $pattern->id ?? '{pattern ID is missing}';
    8686
    8787        $this->assertTrue(
Note: See TracChangeset for help on using the changeset viewer.