Make WordPress Core


Ignore:
Timestamp:
01/03/2026 06:15:57 AM (3 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/application-passwords.php

    r59084 r61424  
    155155        $updated_item = WP_Application_Passwords::get_user_application_password( self::$user_id, $uuid );
    156156        foreach ( $updated_item as $key => $update_value ) {
    157             $expected_value = isset( $update[ $key ] ) ? $update[ $key ] : $original_item[ $key ];
     157            $expected_value = $update[ $key ] ?? $original_item[ $key ];
    158158            $this->assertSame( $expected_value, $update_value );
    159159        }
Note: See TracChangeset for help on using the changeset viewer.