Make WordPress Core


Ignore:
Timestamp:
07/28/2026 04:23:21 PM (8 weeks ago)
Author:
SergeyBiryukov
Message:

Tests: Use null coalescing operator over isset() checks.

This commit replaces verbose isset()-and-return blocks with the ?? operator in the object cache helper and font-face test dataset.

Follow-up to [40561], [56500], [59260].

Props Soean, mukesh27.
See #64894.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/object-cache.php

    r62699 r62870  
    23652365                $derived_key = $this->buildKey( $key, $group );
    23662366
    2367                 if ( isset( $this->cache[ $derived_key ] ) ) {
    2368                         return $this->cache[ $derived_key ];
    2369                 }
    2370 
    2371                 return false;
     2367                return $this->cache[ $derived_key ] ?? false;
    23722368        }
    23732369
Note: See TracChangeset for help on using the changeset viewer.